Skip to content

Added directory traversal#36

Open
dhruvsomani wants to merge 1 commit into
myint:masterfrom
dhruvsomani:Directory
Open

Added directory traversal#36
dhruvsomani wants to merge 1 commit into
myint:masterfrom
dhruvsomani:Directory

Conversation

@dhruvsomani

@dhruvsomani dhruvsomani commented Nov 12, 2018

Copy link
Copy Markdown
Contributor

This commit adds the possibility of traversing directories with scspell. Also, the command line argument --ext has been added and can be used more than once and all the files in the directories with those extensions will be checked. In case, the argument is not supplied, all the files in the directory and subdirectories would be checked.

Example: scspell dir1 dir2 --ext py --ext txt
This checks for all .py and .txt files in dir1 and dir2.

Closes #22

@dhruvsomani

dhruvsomani commented Nov 12, 2018

Copy link
Copy Markdown
Contributor Author

@myint Do you know if it's possible for cram to ignore whitespace differences? Because, I work on Windows and it's creating many errors dues to 'LF' and 'CRLF' differences (checked manually, they are all due to mismatching line endings). I converted the input to 'LF' style using dos2unix but am having trouble comparing the output with the tests.

[Edit] This looks like a pending issue.

Comment thread scspell/__init__.py Outdated
Comment thread scspell/__init__.py Outdated
Comment thread scspell/__init__.py Outdated

@andrewda andrewda left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good, just a couple small changes!

Comment thread scspell/__init__.py Outdated
Comment thread scspell/__init__.py Outdated
Comment thread scspell/__init__.py Outdated
This commit adds the possibility of traversing directories with scspell. Also, the command line argument `--ext` has been added and can be used more than once and all the files in the directories with those extensions will be checked. In case, the argument is not supplied, *all* the files in the directory and *subdirectories* would be checked.

Example:
```scspell dir --ext py --ext txt```

Closes myint#22
Comment thread scspell/__init__.py
if not spell_check_file(f, dicts, ignores, report_only, c_escapes):
okay = False
else:
for dir, subdir, files in os.walk(f):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Same comment as @jayvdb about dir being reserved. I see that the code changed, but the name collision is still there.

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.

5 participants