Skip to content

Commit

Permalink
feat: 🎸 Add option for Indentation length
Browse files Browse the repository at this point in the history
Option Indentation now available to set the indentation length of
the many linters and formatters.

✅ Closes: #44
  • Loading branch information
abelsiqueira committed May 14, 2024
1 parent 8ff9a82 commit b5496df
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning].

## [Unreleased]

### Added

- Add Indentation option (#44)

### Fixed

- Coverage now checks main branch (#65)
Expand Down
5 changes: 5 additions & 0 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ License:
- MIT
- MPL-2.0

Indentation:
type: int
help: Indentation for JuliaForm
validator: "{% if Indentation <= 0 %}Indentation must be positive{% endif %}"

AddMacToCI:
type: bool
help: Add macos on CI?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
annotate_untyped_fields_with_any = false
indent = 2
indent = {{ Indentation }}
margin = 100
normalize_line_endings = "unix"
remove_extra_newlines = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ root = true
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_size = 2
indent_size = {{ Indentation }}
indent_style = space
trim_trailing_whitespace = true
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"MD007": {
"indent": 2,
"indent": {{ Indentation }},
"start_indented": false
},
"MD013": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
args: [--fix=lf]
- id: no-commit-to-branch
- id: pretty-format-json
args: [--autofix, --indent=2]
args: [--autofix, --indent={{ Indentation }}]
- id: trailing-whitespace
- id: check-merge-conflict
args: [--assume-in-merge]
Expand Down
2 changes: 0 additions & 2 deletions template/.yamllint.yml

This file was deleted.

2 changes: 2 additions & 0 deletions template/.yamllint.yml.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rules:
indentation: { spaces: {{ Indentation }} }
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ template_options = Dict(
"AuthorEmail" => "[email protected]",
"JuliaMinVersion" => "1.6",
"License" => "MIT",
"Indentation" => "3",
"AddMacToCI" => true,
"AddWinToCI" => true,
"RunJuliaNightlyOnCI" => true,
Expand Down

0 comments on commit b5496df

Please sign in to comment.