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

CLI support for stdin #12

Merged
merged 2 commits into from
Mar 3, 2016
Merged

CLI support for stdin #12

merged 2 commits into from
Mar 3, 2016

Conversation

nexdrew
Copy link
Collaborator

@nexdrew nexdrew commented Mar 3, 2016

This builds on top of PR #11 (and fixes #10) such that the CLI can now read from:

  1. A file, given as file name argument (previously existing)

    dockerfilelint test/examples/Dockerfile.cli
    
  2. Any contents given as an argument (courtesy of @marccampbell)

    dockerfilelint "FROM scratch"
    
  3. stdin, either piped to the bin or entered when bin is executed without any arguments

    cat test/examples/Dockerfile.cli | dockerfilelint
    
    dockerfilelint
    FROM scratch
    ADD busybox.tar.xz /
    CMD ["sh"]
    <Ctrl-D>
    

This PR also allows this package to be installed globally (npm i -g dockerfilelint) and run as the executable bin dockerfilelint (can't believe I didn't notice this before).

Since this PR changes how the bin behaves when no arguments are given, it should probably constitute a semver major bump.

@nexdrew nexdrew changed the title Stdin CLI support for stdin Mar 3, 2016
@emosbaugh
Copy link
Member

looks good

emosbaugh added a commit that referenced this pull request Mar 3, 2016
@emosbaugh emosbaugh merged commit 8e212a6 into replicatedhq:master Mar 3, 2016
@nexdrew nexdrew deleted the stdin branch March 3, 2016 16:20
marccampbell added a commit that referenced this pull request Mar 3, 2016
Bumping major semver because of PR #12
@tianon
Copy link

tianon commented Mar 3, 2016

🤘

@tianon tianon mentioned this pull request Mar 29, 2016
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.

Linting of stdin?
4 participants