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

Diktat CLI runner #1653

Merged
merged 37 commits into from
Apr 6, 2023
Merged

Diktat CLI runner #1653

merged 37 commits into from
Apr 6, 2023

Conversation

nulls
Copy link
Member

@nulls nulls commented Apr 3, 2023

What's done:

  • added diktat-cli to run diktat as a cli command

Cherry-picked #1566

It closes #1557

@nulls nulls added this to the 2.0.0 milestone Apr 3, 2023
@nulls nulls self-assigned this Apr 3, 2023
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

ktlint found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2023

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v2)

  6 files   -    155    6 suites   - 155   27s ⏱️ - 7m 45s
28 tests  - 1 339  27 ✔️  - 1 323  0 💤  - 17  1 +1 
28 runs   - 2 718  27 ✔️  - 2 702  0 💤  - 17  1 +1 

For more details on these failures, see this check.

Results for commit 031d03b. ± Comparison against base commit 0d528ce.

This pull request removes 1344 and adds 5 tests. Note that renamed tests count towards both.
org.cqfn.diktat.plugin.maven.DiktatBaseMojoTest ‑ test default plugin configuration
org.cqfn.diktat.plugin.maven.DiktatBaseMojoTest ‑ test plugin custom configuration
org.cqfn.diktat.ruleset.chapter1.EnumValueCaseTest ‑ incorrect enum pascal case value fix()
org.cqfn.diktat.ruleset.chapter1.EnumValueCaseTest ‑ incorrect enum snake case value fix()
org.cqfn.diktat.ruleset.chapter1.EnumValueCaseTest ‑ incorrect enum unknown style()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect class name fix()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect constant name case fix()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect enum values case fix()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect lambda argument case fix()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect object name fix()
…
org.cqfn.diktat.util.CliUtilsKtTest ‑ notEmptyRoots()
org.cqfn.diktat.util.CliUtilsKtTest ‑ walkByGlobWithEmptyResult(Path)
org.cqfn.diktat.util.CliUtilsKtTest ‑ walkByGlobWithGlobalPath(Path)
org.cqfn.diktat.util.CliUtilsKtTest ‑ walkByGlobWithLeadingAsterisks(Path)
org.cqfn.diktat.util.CliUtilsKtTest ‑ walkByGlobWithRelativePath(Path)

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2023

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v2)

  7 files   -    154    7 suites   - 154   27s ⏱️ - 5m 54s
30 tests  - 1 337  27 ✔️  - 1 304  2 💤  - 34  1 +1 
30 runs   - 2 716  27 ✔️  - 2 683  2 💤  - 34  1 +1 

For more details on these failures, see this check.

Results for commit 031d03b. ± Comparison against base commit 0d528ce.

This pull request removes 1342 and adds 5 tests. Note that renamed tests count towards both.
org.cqfn.diktat.ruleset.chapter1.EnumValueCaseTest ‑ incorrect enum pascal case value fix()
org.cqfn.diktat.ruleset.chapter1.EnumValueCaseTest ‑ incorrect enum snake case value fix()
org.cqfn.diktat.ruleset.chapter1.EnumValueCaseTest ‑ incorrect enum unknown style()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect class name fix()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect constant name case fix()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect enum values case fix()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect lambda argument case fix()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect object name fix()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect variable name case fix()
org.cqfn.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect variable prefix fix()
…
org.cqfn.diktat.util.CliUtilsKtTest ‑ notEmptyRoots()
org.cqfn.diktat.util.CliUtilsKtTest ‑ walkByGlobWithEmptyResult(Path)
org.cqfn.diktat.util.CliUtilsKtTest ‑ walkByGlobWithGlobalPath(Path)
org.cqfn.diktat.util.CliUtilsKtTest ‑ walkByGlobWithLeadingAsterisks(Path)
org.cqfn.diktat.util.CliUtilsKtTest ‑ walkByGlobWithRelativePath(Path)

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #1653 (0183ae1) into master (0d528ce) will decrease coverage by 1.66%.
The diff coverage is 8.94%.

@@             Coverage Diff              @@
##             master    #1653      +/-   ##
============================================
- Coverage     80.45%   78.79%   -1.66%     
  Complexity     2320     2320              
============================================
  Files           121      125       +4     
  Lines          7920     8108     +188     
  Branches       2036     2046      +10     
============================================
+ Hits           6372     6389      +17     
- Misses          649      820     +171     
  Partials        899      899              
Impacted Files Coverage Δ
...-cli/src/main/kotlin/org/cqfn/diktat/DiktatMain.kt 0.00% <0.00%> (ø)
.../src/main/kotlin/org/cqfn/diktat/cli/DiktatMode.kt 0.00% <0.00%> (ø)
...ain/kotlin/org/cqfn/diktat/cli/DiktatProperties.kt 0.00% <0.00%> (ø)
...rg/cqfn/diktat/ktlint/DiktatReporterFactoryImpl.kt 0.00% <0.00%> (ø)
...i/src/main/kotlin/org/cqfn/diktat/util/CliUtils.kt 77.27% <77.27%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@nulls nulls merged commit 0fd74b5 into master Apr 6, 2023
@nulls nulls deleted the feature/diktat-cli branch April 6, 2023 11:33
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.

Add main class for diktat.jar
2 participants