Skip to content

Commit

Permalink
Merge pull request #31 from tsandrini/updates
Browse files Browse the repository at this point in the history
Flake-parts: update treefmt,pre-commit-hooks defaults & update github templates
  • Loading branch information
tsandrini authored Aug 7, 2024
2 parents 36fcea3 + db9cb1b commit 0f21b53
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 58 deletions.
28 changes: 17 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

name: 🪲 Bug Report
about: Create a bug report to help us resolve the bug
title: "🪲[Bug]: "
labels: "bug"
assignees: ""
---

## Describe the bug

A clear and concise description of what the bug is.

## Steps To Reproduce

Steps to reproduce the behavior:

1. ...
1. ...
1. ...
2. ...
3. ...

## Expected behavior

A clear and concise description of what you expected to happen.

## Screenshots

If applicable, add screenshots to help explain your problem.

## Additional context

Add any other context about the problem here.

## Notify maintainers

<!--
Please @ people who are in the `meta.maintainers` list of the offending package or module.
If in doubt, check `git blame` for whoever last touched something.
Please @ people who are in the `meta.maintainers` list of the offending package
or module. If in doubt, check `git blame` for whoever last touched something.
-->

## Metadata

Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.

```console
Expand All @@ -42,4 +48,4 @@ output here

---

Add a :+1: [reaction] to [issues you find important].
Add a :+1: \[reaction\] to \[issues you find important\].
28 changes: 16 additions & 12 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature-request
assignees: ''

name: 💡 Feature Request
about: Suggest an interesting feature idea for this project
title: '💡[FEATURE]: '
labels: "enhancement"
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## Is your feature request related to a problem? Please describe

A clear and concise description of what the problem is. Ex. I'm always frustrated
when \[...\]

## Describe the solution you'd like

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
## Additional context

Add any other context or screenshots about the feature request here.

---

Add a :+1: [reaction] to [issues you find important].
Add a :+1: \[reaction\] to \[issues you find important\].
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- markdownlint-disable MD041 -->

## Overview

<!-- Provide a brief overview of what this PR aims to accomplish. For instance,
Expand Down
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ updates:
interval: "weekly"
labels:
- dependencies

# NOTE: For additional ecosystems refer to the documentation
# package-ecosystem: "gitsubmodule"
# directory: "/"
# schedule:
# interval: "weekly"
# labels:
# - dependencies

# - package-ecosystem: "docker"
# directory: "/"
# schedule:
Expand Down
3 changes: 2 additions & 1 deletion flake-parts-bootstrap/_bootstrap/.envrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi
Expand All @@ -12,7 +14,6 @@ watch_file flake.lock
[ -f flake-parts/treefmt.nix ] && watch_file flake-parts/treefmt.nix
[ -f flake-parts/pre-commit-hooks.nix ] && watch_file flake-parts/pre-commit-hooks.nix


# Check which devshell implementation we are using and load that one
if [ -f flake-parts/devenv/dev.nix ]; then
if ! use flake .#dev --accept-flake-config --override-input devenv-root "file+file://"<(printf %s "$PWD"); then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- markdownlint-disable MD041 -->

## Overview

<!-- Provide a brief overview of what this PR aims to accomplish. For instance,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

name: 🪲 Bug Report
about: Create a bug report to help us resolve the bug
title: "🪲[Bug]: "
labels: "bug"
assignees: ""
---

## Describe the bug

A clear and concise description of what the bug is.

## Steps To Reproduce

Steps to reproduce the behavior:

1. ...
1. ...
1. ...
2. ...
3. ...

## Expected behavior

A clear and concise description of what you expected to happen.

## Screenshots

If applicable, add screenshots to help explain your problem.

## Additional context

Add any other context about the problem here.

## Notify maintainers

<!--
Please @ people who are in the `meta.maintainers` list of the offending package or module.
If in doubt, check `git blame` for whoever last touched something.
Please @ people who are in the `meta.maintainers` list of the offending package
or module. If in doubt, check `git blame` for whoever last touched something.
-->

## Metadata

Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.

```console
Expand All @@ -42,4 +48,4 @@ output here

---

Add a :+1: [reaction] to [issues you find important].
Add a :+1: \[reaction\] to \[issues you find important\].
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature-request
assignees: ''

name: 💡 Feature Request
about: Suggest an interesting feature idea for this project
title: '💡[FEATURE]: '
labels: "enhancement"
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## Is your feature request related to a problem? Please describe

A clear and concise description of what the problem is. Ex. I'm always frustrated
when \[...\]

## Describe the solution you'd like

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
## Additional context

Add any other context or screenshots about the feature request here.

---

Add a :+1: [reaction] to [issues you find important].
Add a :+1: \[reaction\] to \[issues you find important\].
4 changes: 2 additions & 2 deletions flake-parts/pre-commit-hooks/flake-parts/pre-commit-hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

nil.enable = true; # Nix Language server, an incremental analysis assistant for writing in Nix.
markdownlint.enable = true; # Markdown lint tool
# typos.enable = true; # Source code spell checker

actionlint.enable = true; # GitHub workflows linting
commitizen.enable = true; # Commitizen is release management tool designed for teams.
editorconfig-checker.enable = true; # A tool to verify that your files are in harmony with your .editorconfig
# actionlint.enable = true; # GitHub workflows linting
# typos.enable = true; # Source code spell checker

gitleaks = {
enable = true;
Expand Down
28 changes: 21 additions & 7 deletions flake-parts/treefmt/flake-parts/treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,32 @@
flakeFormatter = true;
projectRootFile = "flake.nix";

settings = {
global.excludes = [
"*.age" # Age encrypted files
];
shellcheck.includes = [
"*.sh"
".envrc"
];
prettier.editorconfig = true;
};

programs = {
deadnix.enable = true; # Find and remove unused code in .nix source files
statix.enable = true; # Lints and suggestions for the nix programming language
nixfmt-rfc-style.enable = true; # An opinionated formatter for Nix
# NOTE Choose a different formatter if you'd like to
# nixfmt.enable = true; # An opinionated formatter for Nix
# alejandra.enable = true; # The Uncompromising Nix Code Formatter
nixfmt.enable = true; # An opinionated formatter for Nix

# prettier.enable = true; # Prettier is an opinionated code formatter
prettier.enable = true; # Prettier is an opinionated code formatter
yamlfmt.enable = true; # An extensible command line tool or library to format yaml files.
jsonfmt.enable = true; # Formatter for JSON files
# mdformat.enable = true; # CommonMark compliant Markdown formatter
# yamlfmt.enable = true; # An extensible command line tool or library to format yaml files.
# jsonfmt.enable = true; # Formatter for JSON files

# shellcheck.enable = true; # Shell script analysis tool
# shfmt.enable = true; # Shell parser and formatter

# actionlint.enable = true; # Static checker for GitHub Actions workflow files
# mdsh.enable = true; # Markdown shell pre-processor
};
};
};
Expand Down

0 comments on commit 0f21b53

Please sign in to comment.