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

** Doesn't work recursively #15

Open
GuyHadas opened this issue Aug 15, 2016 · 4 comments
Open

** Doesn't work recursively #15

GuyHadas opened this issue Aug 15, 2016 · 4 comments

Comments

@GuyHadas
Copy link

app.zip

Getting script to find all the html files is not doable with ** in path.

@juanjoDiaz
Copy link

Any chance of fixing this soon??

Just to elaborate a bit more... Let's say we have a project as:

|-- src
    | -- css
        | -- ...
    | -- html
        | -- module1
            | -- ...
        | -- module2
            | -- ...
        | -- index.html
    | -- js
        | -- ...

If I do htmllint src/html/**/*.html, only src/html/index.html will be linted. On the other hand, If I do htmllint src/html/**/**/*.html, only the contents of src/html/module1 and src/html/module2 will be linted

@Potherca
Copy link

Until this is resolved, a variation of the following might work for you:

htmllint $(find . -name '*.html')

@mlochbaum
Copy link
Member

FINALLY had a look at this. It seems like the only problem is that the shell is catching these patterns and expanding them incorrectly before they get to htmllint. To avoid this enclose in double quotes: htmllint "src/html/**/*.html". This is awkward, but other commands like find have similar problems so it's nothing unheard of.

Can someone confirm that enclosing in quotes works correctly?

@compeek
Copy link

compeek commented Aug 13, 2020

FINALLY had a look at this. It seems like the only problem is that the shell is catching these patterns and expanding them incorrectly before they get to htmllint. To avoid this enclose in double quotes: htmllint "src/html/**/*.html". This is awkward, but other commands like find have similar problems so it's nothing unheard of.

Can someone confirm that enclosing in quotes works correctly?

@mlochbaum I realize this is very old, but thank you for the suggestion. It works for me.

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

No branches or pull requests

5 participants