Skip to content

Instantly share code, notes, and snippets.

@looztra
Last active February 27, 2019 13:42
Show Gist options
  • Select an option

  • Save looztra/6648975e49f17881f4db60993c909cb7 to your computer and use it in GitHub Desktop.

Select an option

Save looztra/6648975e49f17881f4db60993c909cb7 to your computer and use it in GitHub Desktop.

Revisions

  1. looztra revised this gist Feb 13, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .github--CODEOWNERS
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    * @asiainspection/TechOps
    * @asiainspection/techops
  2. looztra revised this gist Feb 12, 2019. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion alias--bootstrap-project.fish
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ function bootstrap-project-techops -d 'bootstrap project with default common con
    set -l tmpdir (mktemp -d /tmp/tmp.gist-{$gist_id}-XXXXXXXX)
    git clone --quiet https://gist.github.com/looztra/{$gist_id} $tmpdir >/dev/null
    echo "Creating .circleci directory"
    mkdir -p .circleci
    mkdir -p .circleci .github
    echo "Creating .circleci/config.yml if it doesn't exist"
    if not test -f .circleci/config.yml
    mv $tmpdir/.circleci--config.yml .circleci/config.yml
    @@ -24,6 +24,16 @@ function bootstrap-project-techops -d 'bootstrap project with default common con
    diff .editorconfig $tmpdir/.editorconfig
    echo "---"
    end
    echo "Creating .github/CODEOWNERS if it doesn't exist"
    if not test -f .github/CODEOWNERS
    mv $tmpdir/.github--CODEOWNERS .github/CODEOWNERS
    else
    echo ".github/CODEOWNERS already exists, skipping"
    echo "Diff of existing vs gist"
    echo "---"
    diff .github/CODEOWNERS $tmpdir/.github--CODEOWNERS
    echo "---"
    end

    rm -rf $tmpdir
    end
  3. looztra revised this gist Feb 12, 2019. 3 changed files with 36 additions and 0 deletions.
    1 change: 1 addition & 0 deletions .github--CODEOWNERS
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    * @asiainspection/TechOps
    29 changes: 29 additions & 0 deletions alias--bootstrap-project.fish
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    function bootstrap-project-techops -d 'bootstrap project with default common config'
    set -l gist_id 6648975e49f17881f4db60993c909cb7
    set -l tmpdir (mktemp -d /tmp/tmp.gist-{$gist_id}-XXXXXXXX)
    git clone --quiet https://gist.github.com/looztra/{$gist_id} $tmpdir >/dev/null
    echo "Creating .circleci directory"
    mkdir -p .circleci
    echo "Creating .circleci/config.yml if it doesn't exist"
    if not test -f .circleci/config.yml
    mv $tmpdir/.circleci--config.yml .circleci/config.yml
    else
    echo ".circleci/config.yml already exists, skipping"
    echo "Diff of existing vs gist"
    echo "---"
    diff .circleci/config.yml $tmpdir/.circleci--config.yml
    echo "---"
    end
    echo "Creating .editorconfig if it doesn't exist"
    if not test -f .editorconfig
    mv $tmpdir/.editorconfig .editorconfig
    else
    echo ".editorconfig already exists, skipping"
    echo "Diff of existing vs gist"
    echo "---"
    diff .editorconfig $tmpdir/.editorconfig
    echo "---"
    end

    rm -rf $tmpdir
    end
    6 changes: 6 additions & 0 deletions alias-bootstrap_project.bash
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    alias bootstrap_project="git clone --quiet https://gist.github.com/looztra/6648975e49f17881f4db60993c909cb7 > /dev/null \
    && mkdir -p .circleci .github\
    && mv 6648975e49f17881f4db60993c909cb7/.circleci--config.yml .circleci/config.yml \
    && mv 6648975e49f17881f4db60993c909cb7/.editorconfig .editorconfig \
    && mv 6648975e49f17881f4db60993c909cb7/.github--CODEOWNERS .github/CODEOWNERS \
    && rm -fr 6648975e49f17881f4db60993c909cb7"
  4. looztra revised this gist Feb 11, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .editorconfig
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,7 @@ max_line_length = none

    [*.md]
    trim_trailing_whitespace = false
    max_line_length = off
    max_line_length = none

    # Matches the exact files either package.json or .travis.yml
    [{package.json,.travis.yml}]
  5. looztra renamed this gist Feb 11, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. looztra revised this gist Feb 11, 2019. 1 changed file with 48 additions and 0 deletions.
    48 changes: 48 additions & 0 deletions .editorconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    # EditorConfig is awesome: https://EditorConfig.org

    # top-most EditorConfig file
    root = true

    # Unix-style newlines with a newline ending every file
    [*]
    charset = utf-8
    end_of_line = lf
    indent_size = 2
    indent_style = space
    insert_final_newline = true
    max_line_length = 120
    trim_trailing_whitespace = true

    # Matches multiple files with brace expansion notation
    # Set default charset
    [*.{js,py}]
    charset = utf-8

    # 4 space indentation
    [*.py]
    indent_style = space
    indent_size = 4
    max_line_length = 79

    # Tab indentation (no size specified)
    [Makefile]
    indent_style = tab

    [*.{tf,tfvars}]
    indent_size = 2
    indent_style = space
    max_line_length = none

    [*.{yml,yaml}]
    indent_size = 2
    indent_style = space
    max_line_length = none

    [*.md]
    trim_trailing_whitespace = false
    max_line_length = off

    # Matches the exact files either package.json or .travis.yml
    [{package.json,.travis.yml}]
    indent_style = space
    indent_size = 2
  7. looztra created this gist Feb 11, 2019.
    22 changes: 22 additions & 0 deletions config.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    ---
    version: 2.1
    jobs:
    eclint:
    working_directory: ~/docker-eclint/
    docker:
    - image: qima/eclint:circleci-2.8.1-7c65341
    steps:
    - checkout
    - run:
    name: Validate Editor Config rules
    command: |
    set -x
    ls -l
    git ls-files
    eclint check $(git ls-files)
    workflows:
    version: 2
    workflow:
    jobs:
    - eclint