nixos-option: clean up includes based on clang-tidy suggestions
Before the code was using include-what-you-means, but it's a bit tricky to integrate this in nix. I had some trouble with nix-eval-jobs when using include-what-you-means. clang-tidy on the other hand proved more robust to me and is useful for linting in general, so less tooling overall for this little project.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
Checks:
|
||||
- -*
|
||||
- misc-include-cleaner
|
||||
# TODO
|
||||
# - bugprone-*
|
||||
# - performance-*
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
// Since they are not, copy/paste them here.
|
||||
// TODO: Delete these and use the ones in the library as they become available.
|
||||
|
||||
#include <string_view>
|
||||
#include "libnix-copy-paste.hh"
|
||||
#include <nix/print.hh> // for Strings
|
||||
#include <nix/print.hh>
|
||||
|
||||
// From nix/src/nix/repl.cc
|
||||
bool isVarName(const std::string_view & s)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <nix/types.hh>
|
||||
#include <string_view>
|
||||
|
||||
bool isVarName(const std::string_view & s);
|
||||
|
||||
@@ -1,20 +1,36 @@
|
||||
#include <nix/args.hh> // for argvToStrings, UsageError
|
||||
#include <nix/attr-path.hh> // for findAlongAttrPath, parseAttrPath
|
||||
#include <nix/attr-set.hh> // for Attr, Bindings, Bindings::iterator
|
||||
#include <nix/common-eval-args.hh> // for MixEvalArgs
|
||||
#include <nix/eval-gc.hh> // for initGC, initNix
|
||||
#include <nix/eval-inline.hh> // for EvalState::forceValue
|
||||
#include <nix/eval.hh> // for EvalState, initGC, operator<<
|
||||
#include <nix/globals.hh> // for initPlugins, Settings, settings
|
||||
#include <nix/nixexpr.hh> // for Pos
|
||||
#include <nix/shared.hh> // for getArg, LegacyArgs, printVersion
|
||||
#include <nix/store-api.hh> // for openStore
|
||||
#include <nix/symbol-table.hh> // for Symbol, SymbolTable
|
||||
#include <nix/types.hh> // for Error, Path, Strings, PathSet
|
||||
#include <nix/util.hh> // for absPath, baseNameOf
|
||||
#include <nix/value.hh> // for Value, Value::(anonymous), Value:...
|
||||
#include <string> // for string, operator+, operator==
|
||||
#include <utility> // for move
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <optional>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include <nix/args.hh>
|
||||
#include <nix/attr-path.hh>
|
||||
#include <nix/attr-set.hh>
|
||||
#include <nix/common-eval-args.hh>
|
||||
#include <nix/error.hh>
|
||||
#include <nix/eval-error.hh>
|
||||
#include <nix/eval-gc.hh>
|
||||
#include <nix/eval.hh>
|
||||
#include <nix/file-system.hh>
|
||||
#include <nix/globals.hh>
|
||||
#include <nix/nixexpr.hh>
|
||||
#include <nix/pos-idx.hh>
|
||||
#include <nix/print.hh>
|
||||
#include <nix/ref.hh>
|
||||
#include <nix/shared.hh>
|
||||
#include <nix/store-api.hh>
|
||||
#include <nix/symbol-table.hh>
|
||||
#include <nix/types.hh>
|
||||
#include <nix/value.hh>
|
||||
#include <nix/value/context.hh>
|
||||
|
||||
#include "libnix-copy-paste.hh"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user