diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-05-03 16:54:37 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-05-03 16:54:37 +0200 |
commit | cf1f1262bdf2155495df682f121654b2aba04288 (patch) | |
tree | 3a1b7ab26665d56ab8828b680238334dc4ed86aa /templates | |
parent | chore(version): v0.6.2 (diff) | |
download | flake-templates-cf1f1262bdf2155495df682f121654b2aba04288.tar.gz flake-templates-cf1f1262bdf2155495df682f121654b2aba04288.zip |
chore(templates/rust): Quickly Update [THIS WILL BE REBASED]
Diffstat (limited to '')
-rw-r--r-- | templates/rust/.envrc | 3 | ||||
-rw-r--r-- | templates/rust/.licensure.yml | 13 | ||||
-rwxr-xr-x | templates/rust/scripts/renew_copyright_header.sh | 4 |
3 files changed, 16 insertions, 4 deletions
diff --git a/templates/rust/.envrc b/templates/rust/.envrc index 8f9d5d7..c8c5665 100644 --- a/templates/rust/.envrc +++ b/templates/rust/.envrc @@ -1,7 +1,8 @@ use flake || use nix watch_file flake.nix -PATH_add ./target +PATH_add ./target/debug +PATH_add ./target/release PATH_add ./scripts if on_git_branch; then diff --git a/templates/rust/.licensure.yml b/templates/rust/.licensure.yml index 639d750..fe108c2 100644 --- a/templates/rust/.licensure.yml +++ b/templates/rust/.licensure.yml @@ -80,7 +80,7 @@ licenses: GNU General Public License for more details. You should have received a copy of the GNU General Public License - and the Lesser GNU General Public License along with this program. + along with this program. If not, see <https://www.gnu.org/licenses/>. @@ -109,6 +109,7 @@ comments: - extensions: - js - go + - pest # The commenter field defines the kind of commenter to # generate. There are two types of commenters: line and block. # @@ -171,6 +172,16 @@ comments: comment_char: "%" trailing_lines: 1 + - extensions: + - ebnf + commenter: + type: block + start_block_char: "#(*\n" + end_block_char: "#*)\n" + per_line_char: "#" + trailing_lines: 1 + + # The extension string "any" is special and so will match any file # extensions. Commenter configurations are always checked in the # order they are defined, so if any is used it should be the last diff --git a/templates/rust/scripts/renew_copyright_header.sh b/templates/rust/scripts/renew_copyright_header.sh index 4f424c3..737435b 100755 --- a/templates/rust/scripts/renew_copyright_header.sh +++ b/templates/rust/scripts/renew_copyright_header.sh @@ -15,7 +15,7 @@ remove() { # formatters do weird things to the file case "$extension" in # normal '#' comments (these are $TEMPLATE_LINE_LENGTH lines long) - "Makefile" | "toml" | "envrc" | "yml" | "gitignore" | "awk") + "Makefile" | "toml" | "envrc" | "yml" | "gitignore" | "awk" | "pest") sed --in-place "1,${TEMPLATE_LINE_LENGTH}d" "$file" ;; # LaTeX files (or TeX files in general) have a different license, use the @@ -24,7 +24,7 @@ remove() { sed --in-place "1,${LATEX_TEMPLATE_LINE_LENGTH}d" "$file" ;; # normal '/* ... */' like comments (these are $TEMPLATE_LINE_LENGTH + 2 lines long) - "c" | "h" | "md" | "rs") + "c" | "h" | "md" | "rs" | "html") length="$((TEMPLATE_LINE_LENGTH + 2))" sed --in-place "1,${length}d;" "$file" ;; |