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

Check if copyright year is valid #270

Merged
merged 11 commits into from
Sep 22, 2020
Merged

Conversation

aktsay6
Copy link
Collaborator

@aktsay6 aktsay6 commented Sep 11, 2020

Which rule and warnings did you add?

Rule checks if the year of copyright is valid. For example: (c) 2019 need to be changed to 2020

Actions checklist

  • Implemented Rule, added Warnings
  • Added tests on checks
  • Added tests on fixers
  • Updated diktat-analysis.yml
  • Updated available-rules.md

Closes #3

### What's done:
  * Added new rule, that checks year of copyright
  * Added warn test
  * Added fix test
@aktsay6 aktsay6 added the enhancement New feature or request label Sep 11, 2020
@codecov
Copy link

codecov bot commented Sep 11, 2020

Codecov Report

Merging #270 into master will increase coverage by 0.81%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #270      +/-   ##
============================================
+ Coverage     81.31%   82.12%   +0.81%     
- Complexity      966      976      +10     
============================================
  Files            51       50       -1     
  Lines          2531     2534       +3     
  Branches        793      798       +5     
============================================
+ Hits           2058     2081      +23     
+ Misses          187      169      -18     
+ Partials        286      284       -2     
Flag Coverage Δ Complexity Δ
#unittests 82.12% <100.00%> (+0.81%) 976.00 <6.00> (+10.00)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...at-rules/src/main/kotlin/generated/WarningNames.kt 0.00% <ø> (ø) 0.00 <0.00> (ø)
...tlin/org/cqfn/diktat/ruleset/constants/Warnings.kt 96.47% <100.00%> (+0.04%) 8.00 <0.00> (ø)
...diktat/ruleset/rules/comments/HeaderCommentRule.kt 88.60% <100.00%> (+7.25%) 36.00 <6.00> (+10.00)

Continue to review full report at Codecov.

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

@aktsay6 aktsay6 requested a review from petertrr September 14, 2020 09:48
### What's done:
  * Added lint tests
  * Remade Generation to validate year
### What's done:
  * Added lint tests
  * Remade Generation to validate year
@aktsay6 aktsay6 requested a review from petertrr September 14, 2020 15:00
# Conflicts:
#	diktat-rules/src/main/resources/diktat-analysis.yml
### What's done:
  * Fixed bugs
### What's done:
  * Fixed bugs
@aktsay6 aktsay6 requested a review from petertrr September 17, 2020 17:18
pom.xml Outdated
@@ -325,6 +325,9 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<configuration>
<excludes>GenerationKt</excludes>
Copy link
Member

@petertrr petertrr Sep 22, 2020

Choose a reason for hiding this comment

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

Turns out I was wrong and it doesn't work like this. Could you investigate further? Maybe, **/GenerationKt.class? Or just **/Generation.kt?

@aktsay6 aktsay6 requested a review from petertrr September 22, 2020 11:05
@aktsay6 aktsay6 merged commit 2e47e45 into master Sep 22, 2020
@aktsay6 aktsay6 deleted the feature/check-copyright-date branch September 22, 2020 14:26
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
None yet
Development

Successfully merging this pull request may close these issues.

[Formatting rules] Add support for checking and fixing copyright date in the Kdoc
2 participants