-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
nixos-option: cleanup and linting #355748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
00c3a3d
nixos-option: add clang-tidy
Mic92 7e9e33e
nixos-option: add devShell
Mic92 2269814
nixos-option: clean up includes based on clang-tidy suggestions
Mic92 553461a
nixos-option: use c++20 starts_with
Mic92 e8d76d6
nixos-option: explicitly cast to int from size_t
Mic92 2cfcb6f
nixos-option: don't throw errors in main
Mic92 01580b1
nixos-option: enable bugprone lints
Mic92 c3e4852
nixos-option: enable performance lint
Mic92 9c4e940
nixos-option: enable modernize-* checks in clang-tidy
Mic92 e5705ba
nixos-option: enable readability lint
Mic92 1e59fb4
nixos-option: enable more lints
Mic92 e7367a6
nixos-option: enable misc lints
Mic92 6fe4fb2
nixos-option: enable cppcoreguidelines lints
Mic92 7a8407e
nixos-option: fix potential memory leak in mapOptions
Mic92 cf11719
nixos-option: disable modernize-use-trailing-return-type
Mic92 b7ea84f
nixos-options: don't use references for string_views
Mic92 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| Checks: | ||
| - bugprone-* | ||
| # don't find them too problematic | ||
| - -bugprone-easily-swappable-parameters | ||
| - performance-* | ||
| - modernize-* | ||
| # doesn't improve readability much in this project | ||
| - -modernize-use-trailing-return-type | ||
| - readability-* | ||
| # don't find them too problematic | ||
| - -readability-identifier-length | ||
| - -readability-magic-numbers | ||
| - portability-* | ||
| - concurrency-* | ||
| - google-* | ||
| - -google-readability-todo | ||
| - misc-* | ||
| # we maybe want to address this? | ||
| - -misc-no-recursion | ||
| - cppcoreguidelines-* | ||
| - -cppcoreguidelines-avoid-magic-numbers | ||
| # We could use std::reference_wrapper, but it's not super important | ||
| - -cppcoreguidelines-avoid-const-or-ref-data-members | ||
| UseColor: true | ||
| CheckOptions: | ||
| misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic: True | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| use nix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| with import ../../../.. { }; | ||
| nixos-option.overrideAttrs (old: { | ||
| nativeBuildInputs = old.nativeBuildInputs ++ [ | ||
| # hiprio so that it has a higher priority than the default unwrapped clang tools from clang if our stdenv is based on clang | ||
| (lib.hiPrio pkgs.buildPackages.clang-tools) | ||
| ]; | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| #pragma once | ||
|
|
||
| #include <nix/types.hh> | ||
| #include <string_view> | ||
|
|
||
| bool isVarName(const std::string_view & s); | ||
| bool isVarName(std::string_view s); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.