Closed blag closed 5 years ago
Bump.
Hey @asbjornenge - I see from #16 that you're a little swamped. Do you mind adding me as a maintainer so I can merge this (and the regex from #16) in? Thanks!
@blag done! Thanks 👍❤️
Please feel free to look at any other PRs and Issues too. To be frank some of this is getting a bit over my head 🙈 I made it way back when Dockerfiles first was a thing and I'm not really a regex guy at all 😛
Thanks, I'll do what I can! ❤️
The previous first line match regex was too liberal - it matched with Python files that began with
from ... import ...
. This modifies the first line match regex to include a negative lookahead assertion that prevents matching ifimport
is found. This does not create any more false negatives, because theimport
keyword is only expected after exactly one non-whitespace token, which is impossible in a syntactically correct Dockerfile.