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 rule to detect commented code #1

Merged
merged 6 commits into from Jul 3, 2020

Conversation

petertrr
Copy link
Member

@petertrr petertrr commented Jun 30, 2020

Which rule and warnings did you add?

CommentsRule, Warnings.COMMENTED_OUT_CODE.
No fixers for now.

Actions checklist

  • Implemented Rule, added Warnings
  • Added tests on checks
  • Updated rules-config.json
  • Updated README.md

Fixme

  • Offset is lost for lines which are merged at first and then split again
  • Logic can be improved and some more real-world eamples added to test cases

### What's done:
* Added CommentsRule with warning COMMENTED_OUT_CODE
* Added tests
* Fixed typo in all of custom rules
@petertrr petertrr requested a review from akuleshov7 June 30, 2020 12:32
### What's done:
* Updated README.md
…mmented-code

# Conflicts:
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetProvider.kt
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/FileNaming.kt
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/IdentifierNaming.kt
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/KdocComments.kt
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/KdocFormatting.kt
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/KdocMethods.kt
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/PackageNaming.kt
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/HeaderCommentRule.kt
### What's done:
* Fixes after merge
### What's done:
* Refactoring
* Additional test case
@petertrr petertrr requested a review from akuleshov7 July 2, 2020 17:51
Copy link
Member

@akuleshov7 akuleshov7 left a comment

Choose a reason for hiding this comment

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

LGTM

@petertrr petertrr merged commit 0cdaf18 into master Jul 3, 2020
@petertrr petertrr deleted the feature/rule-2.7-commented-code branch July 3, 2020 11:20
@akuleshov7 akuleshov7 self-assigned this Jul 4, 2020
@akuleshov7 akuleshov7 added this to Done in diKTat Jul 4, 2020
@akuleshov7 akuleshov7 added the enhancement New feature or request label Jul 4, 2020
petertrr added a commit that referenced this pull request Jul 31, 2020
* Added rule to detect commented code

### What's done:
* Added CommentsRule with warning COMMENTED_OUT_CODE
* Added tests
* Fixed typo in all of custom rules
*Updated README.md
aktsay6 added a commit that referenced this pull request Nov 10, 2020
### What's done:
  * Fixed bugs
  * Smoke test #1 reworked
aktsay6 added a commit that referenced this pull request Nov 11, 2020
### What's done:
  * Fixed bugs
  * Smoke test #1 reworked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
diKTat
  
Done tasks
Development

Successfully merging this pull request may close these issues.

None yet

2 participants