Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Support multi-file input #6

Merged
merged 1 commit into from
Jan 24, 2016
Merged

Conversation

di
Copy link
Collaborator

@di di commented Jan 12, 2016

This adds the ability to give the html_lint.py command multiple input files instead of a single file, e.g.:

$ ls test/data
invalid.html  more_invalid.html  valid.html

$ html_lint.py test/data/invalid.html test/data/more_invalid.html
<lots of errors>

@di di force-pushed the support-directory-globbing branch 16 times, most recently from fc9781e to 7e3d025 Compare January 13, 2016 01:08

path = options['FILENAME']
is_file = os.path.isfile(path)
html_files = [path] if is_file else glob.glob('{}/*.html'.format(path))
Copy link
Owner

Choose a reason for hiding this comment

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

html is not the only extension that should be supported, htm and many template extensions should be supported as well.

Also, this is counterintuitive, as there is no recursion.

My opinion is that instead of supporting directories we could support multiple filenames.

@di di force-pushed the support-directory-globbing branch from 7e3d025 to ea48dfc Compare January 20, 2016 16:24
@di di changed the title Support multi-file directory globbing Support multi-file input Jan 20, 2016
@di di force-pushed the support-directory-globbing branch 3 times, most recently from 056608d to fdab0d2 Compare January 20, 2016 16:54
@di
Copy link
Collaborator Author

di commented Jan 20, 2016

@sk- I addressed your feedback.

sk- added a commit that referenced this pull request Jan 24, 2016
@sk- sk- merged commit f5f3622 into sk-:master Jan 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants