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

Add new features to slang-tidy #777

Merged
merged 15 commits into from
Jun 27, 2023
Merged

Add new features to slang-tidy #777

merged 15 commits into from
Jun 27, 2023

Conversation

Sustrak
Copy link
Contributor

@Sustrak Sustrak commented Jun 25, 2023

This PR adds new features to slang-tidy:

  • slang-tidy can read its configuration from a .slang-tidy file, closely similar to what .clang-tidy offers.
  • Adds new checks to the linter.
  • Small refactor in the code of the checks.
  • Add option to skip linting checks from specific files.

This PR also adds a new tool: include/slang/util/CppTypePrinter.h

Sustrak and others added 2 commits June 25, 2023 13:13
Added possibility to configure enabled tests with a config file
Added some new tests
@codecov
Copy link

codecov bot commented Jun 25, 2023

Codecov Report

Merging #777 (a28682c) into master (f94723c) will increase coverage by 1.09%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #777      +/-   ##
==========================================
+ Coverage   91.51%   92.60%   +1.09%     
==========================================
  Files         188      188              
  Lines       45544    45579      +35     
==========================================
+ Hits        41678    42208     +530     
+ Misses       3866     3371     -495     
Impacted Files Coverage Δ
...lude/slang/ast/expressions/AssignmentExpressions.h 77.61% <ø> (+4.47%) ⬆️
include/slang/ast/symbols/ValueSymbol.h 100.00% <ø> (ø)
source/ast/symbols/ValueSymbol.cpp 94.97% <0.00%> (-1.62%) ⬇️

... and 42 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f94723c...a28682c. Read the comment docs.

@MikePopoloski
Copy link
Owner

You shouldn't need the SLANG_EXPORT tag on anything in the tidy binary, it's only for library symbols. I suspect the problem might be from not_null being tagged even though it's a template class. I'm going to experiment with removing it and seeing if that helps.

@Sustrak
Copy link
Contributor Author

Sustrak commented Jun 25, 2023

Removed, thanks for taking a look at it

@MikePopoloski
Copy link
Owner

Ok, I committed a potential fix, try rebasing.

@Sustrak
Copy link
Contributor Author

Sustrak commented Jun 25, 2023

It did the trick, thanks. Ready to be merged if you don't see anything sketchy on the code

Sustrak and others added 6 commits June 25, 2023 20:57
Created an object library for the different components of slang-tidy:
checks and config parser. This way these cpp files are not compiled
twice for the binary and for the tests.
@MikePopoloski MikePopoloski merged commit d677dd1 into MikePopoloski:master Jun 27, 2023
18 checks passed
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.

None yet

2 participants