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

allow textAnalyze to run on all files in a dir or matching a prefix #174

Merged
merged 6 commits into from
Sep 8, 2020

Conversation

laverya
Copy link
Member

@laverya laverya commented Apr 15, 2020

fixes #173

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

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

1 issues found.

getFiles := func(n string) (map[string][]byte, error) {
matching := make(map[string][]byte)
for k, v := range test.files {
if strings.HasPrefix(k, n) {
Copy link

Choose a reason for hiding this comment

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

Using continue here is less conditionally indented and more readable.

View Rule

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think this one is relevant

Copy link

Choose a reason for hiding this comment

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

@CodeLingoBot reply @laverya nice catch! Next time you can just reply to the bot like this and it'll pop up on the rule chat. What minimum number of lines do you think we need within the if statement before wanting to avoid nesting? Also @marccampbell? Any thoughts on this (reply on the rule chat and I'll tighten up the rule linter accordingly).

@laverya laverya merged commit f68e0db into master Sep 8, 2020
@laverya laverya deleted the laverya/allow-analyzing-all-files-in-dir branch September 8, 2020 18:44
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.

Allow TextAnalyzer to scan multiple files
3 participants