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

Bug fix: check names of ALL files #78

Merged
merged 1 commit into from
May 21, 2021

Conversation

eedorenko
Copy link
Contributor

@eedorenko eedorenko commented May 20, 2021

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Check file names of all files in the target path.

What is the current behavior? (You can also link to an open issue here)
Currently names of empty files and just non-text files are not analyzed.

What is the new behavior (if this is a feature change)?
Analyze names of all files in the target path, but still skip analyzing content of empty files and non-text files.

Does this PR introduce a breaking change? (What changes might users need to make due to this PR?)
The linter may detect more violations as all file names are analyzed. If, for some reason, names of some files should not be analyzed, they should be added to the ignore list.

Other information:

@eedorenko eedorenko marked this pull request as draft May 20, 2021 22:35
@eedorenko eedorenko marked this pull request as ready for review May 20, 2021 22:47
@codecov
Copy link

codecov bot commented May 21, 2021

Codecov Report

Merging #78 (dad0dd5) into main (2e9f79d) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #78   +/-   ##
=======================================
  Coverage   95.52%   95.52%           
=======================================
  Files          21       21           
  Lines         469      469           
=======================================
  Hits          448      448           
  Misses         12       12           
  Partials        9        9           
Impacted Files Coverage Δ
pkg/parser/parser.go 100.00% <ø> (ø)
pkg/parser/violations.go 95.00% <100.00%> (+0.40%) ⬆️

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 2e9f79d...dad0dd5. Read the comment docs.

@@ -75,6 +75,17 @@ func TestGenerateFileViolations(t *testing.T) {
assert.Len(t, res.Results, 1)
assert.Regexp(t, "^Filename violation: ", res.Results[0].Reason())
})

t.Run("filename violation for empty file", func(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

👍🏻

@caitlinelfring caitlinelfring changed the title Check names of ALL files Bug fix: check names of ALL files May 21, 2021
@caitlinelfring caitlinelfring merged commit 7cb1c2d into get-woke:main May 21, 2021
@caitlinelfring
Copy link
Member

caitlinelfring commented May 21, 2021

caitlinelfring added a commit that referenced this pull request Jun 20, 2021
@caitlinelfring caitlinelfring mentioned this pull request Jun 20, 2021
3 tasks
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.

None yet

2 participants