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

Initial fix for issue 399 #400

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions yamllint/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ def run(argv=None):

for file in find_files_recursively(args.files, conf):
filepath = file[2:] if file.startswith('./') else file
if(conf.is_file_ignored(filepath) or None):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if(conf.is_file_ignored(filepath) or None):
if conf.is_file_ignored(filepath):

I don't understand how or None would help.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps change the commit text to:

cli: match symlinks to ignore early on, before following them

continue
try:
with io.open(file, newline='') as f:
problems = linter.run(f, conf, filepath)
Expand Down