Skip to content

Add basic linting for etc/ci/ shell scripts #12158

Closed

Description

@aneeshusa

Some good places to start:

  • Check that all lines are 80 characters or less (Servo uses 120 for Rust code, but shell scripts IMO don't need that much horizontal space)
  • Check for the correct shebang and bash options at the top (see the shell section of the style guide)

Came up while reviewing #12156.
I would like for this to be part of tidy so it is checked during ./mach test-tidy.

Files:

  • python/tidy/servo_tidy/tidy.py

Add one or more tests in the python/tidy/servo_tidy_tests/ directory as well.

Activity

  1. added
    E-less-complex
    L-python
    on Jul 2, 2016
  2. highfive commented on Jul 2, 2016

    @highfive

    cc @wafflespeanut

  3. highfive commented on Jul 2, 2016

    @highfive

    Please make a comment here if you intend to work on this issue. Thank you!

  4. jimberlage commented on Jul 2, 2016

    @jimberlage
    Contributor

    Why don't I work on this, since my PR was the one to miss the style guidelines 😄

  5. aneeshusa commented on Jul 2, 2016

    @aneeshusa
    ContributorAuthor

    Go for it! Beware though, you'll need to fix up all of the other scripts that were added previously (I think many of those also fail to conform to these guidelines) :)

  6. added
    C-assigned
    on Jul 2, 2016
  7. jimberlage commented on Jul 5, 2016

    @jimberlage
    Contributor

    I've got most things tidied up, but I do have one question - how do you want to deal with license checks for shell scripts? Right now we have this:

    jberlage$ ./mach test tidy --tidy-all
    Checking files for tidiness...
    ./components/servo/fake-ld.sh:1: incorrect license
    ./etc/ci/check_no_unwrap.sh:1: incorrect license
    ./etc/ci/lockfile_changed.sh:1: incorrect license
    ./etc/ci/manifest_changed.sh:1: incorrect license
    ./etc/ci/upload_docs.sh:1: incorrect license
    ./etc/ci/upload_nightly.sh:1: incorrect license
      Progress: 100% (8667/8667)
    Running the WPT lint...
      Progress: 100% (19686/19686)
    Tests completed in 57.76s
    

    I'm not sure what license should be used, if any.

  8. jimberlage commented on Jul 5, 2016

    @jimberlage
    Contributor

    @aneeshusa any thoughts?

  9. aneeshusa commented on Jul 6, 2016

    @aneeshusa
    ContributorAuthor

    I think MPL 2.0 should be fine (with the /usr/bin/env bash shebang - I think you'll need to add that variation to the license checker). cc @larsbergstrom about licensing

  10. added a commit that references this issue on Jul 22, 2016
    7b209e8
  11. added
    C-has-open-pr
    on Jul 22, 2016
  12. added a commit that references this issue on Jul 22, 2016
    a8c41b7
  13. added a commit that references this issue on Aug 4, 2016
    4bc629b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-assignedC-has-open-prE-less-complexL-python

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions