-
Notifications
You must be signed in to change notification settings - Fork 72
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
A new rule that finds used underscore prefixed elements #643
Conversation
3cf31e2
to
91b6def
Compare
@webwarrior-ws bad rebase ^ ; also, please push 1 by 1 |
@webwarrior-ws I think what you did wrong here when squashing is overlooking/disregarding this common pitfall about git: https://github.com/nblockchain/conventions/blob/master/docs/WorkflowGuidelines.md?plain=1#L245 |
When I rebased there were no conflicts. Then I was squashing commits and something must have gone wrong there. |
Exactly what I meant when I pointed to our documentation, please read this line: https://github.com/nblockchain/conventions/blob/master/docs/WorkflowGuidelines.md?plain=1#L245 |
91b6def
to
82bd8fe
Compare
tests/FSharpLint.Core.Tests/Rules/Conventions/UsedUnderscorePrefixedElements.fs
Outdated
Show resolved
Hide resolved
f4fe23a
to
a98134d
Compare
@webwarrior-ws shouldn't 06fb857's CI be green instead of red? |
In this commit I made tests pass, but self-check fails revealing another bug. Then I added test for this case in next commit and fix in the last commit. |
I think the first 7 commits need to be squashed, we don't gain anything by having them split in many, and their CI statuses are all red anyway (without having a failing test). |
4a66c31
to
35b314c
Compare
Squashed first 7 commits |
@webwarrior-ws commits c0559b8 and 886f064 can be squashed properly too. Also don't forget to address last commit (make test pass -> CI green). Thanks |
e312e98
to
8a0997d
Compare
Add new rule: UsedUnderscorePrefixedElements.
Avoid using mutable variables. Fix match indentation. Remove unnecessary parens. Rename function.
Added failing tests for UsedUnderscorePrefixedElements rule.
Fix rule so that it identifies all usages of identifiers that start with `_`.
Activated inactive tests for UsedUnderscorePrefixedElements and added a new one.
Fix rule so that it doesn't produce error on `_` function arguments.
Removed unused function in UsedUnderscorePrefixedElements rule.
2821987
to
5b6306f
Compare
@webwarrior-ws please note: as the quickfix commits (the last three) require more discussion, I've removed them from this PR. So, once I merge it, you can create new PR for those commits (e.g. cherry-picking them from this backup branch where I pushed them: https://github.com/knocte/FSharpLint/commits/addQuickFixToRule82/ ). |
Supersedes #591
Fixes #573