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

Remove ignoreFolders option from FileSize rule #981

Merged
merged 3 commits into from
Jul 16, 2021

Conversation

petertrr
Copy link
Member

What's done:

  • Removed code
  • Fixed docs

This pull request closes #971

petertrr added 3 commits July 14, 2021 16:23
### What's done:
* Removed code
* Fixed docs
### What's done:
* Removed code
* Fixed docs
### What's done:
* Removed code
* Fixed docs
@petertrr petertrr requested review from kentr0w and orchestr7 July 14, 2021 13:34
@codecov
Copy link

codecov bot commented Jul 14, 2021

Codecov Report

Merging #981 (83499eb) into master (a4ce78f) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #981      +/-   ##
============================================
- Coverage     83.81%   83.81%   -0.01%     
+ Complexity     2410     2407       -3     
============================================
  Files           101      102       +1     
  Lines          6087     6079       -8     
  Branches       1801     1797       -4     
============================================
- Hits           5102     5095       -7     
  Misses          269      269              
+ Partials        716      715       -1     
Flag Coverage Δ
unittests 83.81% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...otlin/org/cqfn/diktat/ruleset/utils/StringUtils.kt 89.65% <ø> (-1.53%) ⬇️
...qfn/diktat/ruleset/rules/chapter1/PackageNaming.kt 91.08% <100.00%> (ø)
...fn/diktat/ruleset/rules/chapter3/files/FileSize.kt 88.23% <100.00%> (+0.23%) ⬆️
.../kotlin/org/cqfn/diktat/ruleset/utils/FileUtils.kt 100.00% <100.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 a4ce78f...83499eb. Read the comment docs.

@@ -276,7 +276,7 @@ class PackageNaming(configRules: List<RulesConfig>) : DiktatRule(
/**
* Directory which is considered the start of sources file tree
*/
const val PACKAGE_PATH_ANCHOR = "src"
const val PACKAGE_PATH_ANCHOR = SRC_DIRECTORY_NAME
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe also move SRC_DIRECTORY_NAME into FileUtils.kt file?

Copy link
Member Author

Choose a reason for hiding this comment

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

But it's already in there

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, confused)

/**
* List of folders, files from which are ignored during the check. For example, for tests.
*/
val ignoreFolders = config["ignoreFolders"]?.replace("\\s+".toRegex(), "")?.split(IGNORE_FOLDERS_SEPARATOR) ?: ignoreFolder
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why now we don't have this parameter?

Copy link
Member Author

Choose a reason for hiding this comment

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

We have decided that we no longer need it. It was originally introduced at the time when we didn't have exclusion mechanism, but now we can add excludes into plugin config or add file-level suppress for any rule, so special setting for file size is no longer required

Copy link
Collaborator

@kentr0w kentr0w 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 aee9fb2 into master Jul 16, 2021
@petertrr petertrr deleted the bugfix/src-path-logging#971 branch July 16, 2021 13:21
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.

src directory is not found in file path <...>/build.gradle.kts
2 participants