Skip to content
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

Added clang-tidy lint to checks #19

Merged
merged 4 commits into from
Jun 8, 2024
Merged

Added clang-tidy lint to checks #19

merged 4 commits into from
Jun 8, 2024

Conversation

HU90m
Copy link
Member

@HU90m HU90m commented Jun 8, 2024

One can now run:

nix run .#clang-lint check
# and
nix run .#clang-lint fix

HU90m added 2 commits June 8, 2024 13:57
The clang-tidy check requires dependancies to be pulled in.
Comment on lines +72 to +75
apps.clang-lint = {
type = "app";
program = getExe clang-lint;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this part could be added to formatter. You can change it to a script calling both alejandra and clang-lint

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a cool idea. I noticed clang-tidy -fix did make changes that broke code and is a little slower than your average formatter. We could just put clang-format and alejandra together as the formatter, but it is quite neat having clang-tidy and clang-format called from the same script.

@HU90m HU90m merged commit 3e8a50a into lowRISC:main Jun 8, 2024
1 check passed
@HU90m HU90m deleted the lints branch June 8, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants