File tree Expand file tree Collapse file tree 6 files changed +46
-1
lines changed Expand file tree Collapse file tree 6 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 1+ # EditorConfig is awesome: https://EditorConfig.org
2+
3+ # top-most EditorConfig file
4+ root = true
5+
6+ [* .nix ]
7+ indent_style = space
8+ indent_size = 2
9+ end_of_line = lf
10+ charset = utf-8
11+ trim_trailing_whitespace = true
12+ insert_final_newline = true
Original file line number Diff line number Diff line change 1+ name : treefmt
2+ on :
3+ pull_request :
4+ push :
5+ branches : develop
6+ jobs :
7+ formatter :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v4
11+ - uses : cachix/install-nix-action@v31
12+ with :
13+ nix_path : nixpkgs=channel:nixos-unstable
14+ - name : treefmt
15+ run : nix-shell -p treefmt nixpkgs-fmt --run "treefmt --ci"
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ __pycache__/
1717result *
1818.env-local
1919.history
20-
20+ .envrc
2121
2222# IDE
2323.idea /
Original file line number Diff line number Diff line change 1+ repos :
2+ - repo : local
3+ hooks :
4+ - id : treefmt
5+ name : treefmt
6+ entry : treefmt
7+ language : system
8+ types : [file]
Original file line number Diff line number Diff line change 14131413 trigger-nix-build = mkApp "trigger-nix-build" "trigger-nix-build" ;
14141414 } ;
14151415
1416+ formatter = pkgs . treefmt ;
1417+
14161418 # 'devShells.default' lists the set of packages that are included in the
14171419 # ambient $PATH environment when you run 'nix develop'. This is useful
14181420 # for development and puts many convenient devtools instantly within
14561458 basePackages . run-testinfra
14571459 basePackages . cleanup-ami
14581460 dbmate
1461+ formatter # treefmt
1462+ nixpkgs-fmt
14591463 nushell
1464+ pre-commit
14601465 pythonEnv
14611466 nix-fast-build
14621467 ] ;
Original file line number Diff line number Diff line change 1+ # One CLI to format the code tree - https://github.com/numtide/treefmt
2+
3+ [formatter .nix ]
4+ command = " nixpkgs-fmt"
5+ includes = [" *.nix" ]
You can’t perform that action at this time.
0 commit comments