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

Fix autofix and add stdin input #5

Merged
merged 8 commits into from
Oct 10, 2020
Merged

Commits on Oct 9, 2020

  1. Update go.sum

    fernandrone committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    0a5d225 View commit details
    Browse the repository at this point in the history
  2. Fix #2 and add stdin

    * Fixes #2. The issue is
    that the "autofix" command line flag was overriding the Config object.
    So even if the config had autofix: true, later in the main function the
    flag value would override this configuration. It didn't help that the
    default bool value for the flag was 'false'.
    
    * Refactor the main code at linelint.go, allowing for input from STDIN.
    This took some inspiration from autopep8, in which to read from STDIN
    requires the "-" positional argument (any other positional argument
    is interpreted as a list of files/dirs to lint, and an "empty" list is
    interpreted as "lint the current directory tree"). This also makes it
    much easier to test the linting from the main entrypoint.
    
    * Add a couple tests as Example in linelint_test.go, using the new
    "read from stdin" functionality.
    fernandrone committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    5f775f4 View commit details
    Browse the repository at this point in the history
  3. Trim some lines

    fernandrone committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    6c9b77c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e9137a9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7c76008 View commit details
    Browse the repository at this point in the history
  6. Fix .drone.yml node img

    fernandrone committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    5680d8c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4396f2b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    af685f4 View commit details
    Browse the repository at this point in the history