git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #121063 from domenkozar/editor-config-ux

editorconfig check: instruct user what to do

commit0ad2f1e24e5f600df01b12972f73447737fc982e authorDomen Kožar <domen@dev.si> dateThu 29 Apr 2021, 19:29 (6 years ago) parent89435197721582
1 file changed+10−5
.github/workflows/editorconfig.yml+10−5
.github/workflows/editorconfig.yml+10−5
@@ -3,6 +3,7 @@ name: "Checking EditorConfig"
33permissions: read-all
44
55on:
6+ # avoids approving first time contributors
67 pull_request_target:
78 branches-ignore:
89 - 'release-**'
@@ -29,13 +30,17 @@ jobs:
2930 if: env.PR_DIFF
3031 - uses: cachix/install-nix-action@v13
3132 if: env.PR_DIFF
32− - name: install editorconfig-checker from unstable channel
33− run: |
34− nix-channel --add https://nixos.org/channels/nixpkgs-unstable
35− nix-channel --update
36− nix-env -iA nixpkgs.editorconfig-checker
33+ with:
34+ # nixpkgs commit is pinned so that it doesn't break
35+ nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/f93ecc4f6bc60414d8b73dbdf615ceb6a2c604df.tar.gz
36+ - name: install editorconfig-checker
37+ run: nix-env -iA editorconfig-checker -f '<nixpkgs>'
3738 if: env.PR_DIFF
3839 - name: Checking EditorConfig
3940 if: env.PR_DIFF
4041 run: |
4142 echo "$PR_DIFF" | xargs editorconfig-checker -disable-indent-size
43+ - if: ${{ failure() }}
44+ run: |
45+ echo "::error :: Hey! It looks like your changes don't follow our editorconfig settings. Read https://editorconfig.org/#download to configure your editor so you never see this error again."
46+