Skip to content

Commit

Permalink
chore: update pre-commit, add yaml lint+fmt (#6)
Browse files Browse the repository at this point in the history
* chore: update pre-commit, add yaml lint+fmt

* chore: ran pre-commit on all files
  • Loading branch information
acovaci authored May 19, 2024
1 parent d7f8ded commit bfd6b0e
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 119 deletions.
9 changes: 5 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
126 changes: 64 additions & 62 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,80 @@
# See https://docs.github.com/en/rest/reference/repos#update-a-repository for all available settings.

---
repository:
name: plumb
description: >
Plumb is a Rust-based CLI for managing programming workspaces and projects.
topics: rust, cli, command-line, command-line-tool, workspace, project,
project-manager, developer-tools
private: false
has_issues: true
has_projects: true
has_wiki: false
has_downloads: true
default_branch: main
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: false
delete_branch_on_merge: true
enable_automated_security_fixes: true
enable_vulnerability_alerts: true
name: plumb
description: >
Plumb is a Rust-based CLI for managing programming workspaces and
projects.
topics: >
rust, cli, command-line, command-line-tool, workspace, project,
project-manager, developer-tools
private: false
has_issues: true
has_projects: true
has_wiki: false
has_downloads: true
default_branch: main
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: false
delete_branch_on_merge: true
enable_automated_security_fixes: true
enable_vulnerability_alerts: true

labels:
- name: bug
color: B60205
description: Something that isn't working as expected.
- name: bug
color: B60205
description: Something that isn't working as expected.

- name: planned
color: FBCA04
description: >
Functionality that we want to implement. Only for use by the maintainers.
- name: planned
color: FBCA04
description: >
Functionality that we want to implement. Only for use by the
maintainers.
- name: feature
color: 1D76DB
description: A suggestion for a new feature.
- name: feature
color: 1D76DB
description: A suggestion for a new feature.

- name: discussion
color: C5DEF5
description: >
For when there's not a clear requirement set, and arriving to a solution
requires discussing it.
- name: discussion
color: C5DEF5
description: >
For when there's not a clear requirement set, and arriving to a
solution requires discussing it.
- name: good first issue
color: 5319E7
description: >
A good issue for first-time contributors. These issues are usually
well-defined.
- name: good first issue
color: 5319E7
description: >
A good issue for first-time contributors. These issues are usually
well-defined.
milestones:
- title: git-support
description: >
Implement necessary git functionality.
state: open
- title: git-support
description: >
Implement necessary git functionality.
state: open

- title: vscode-support
description: >
Interact with vscode to manage workspaces and projects.
state: open
- title: vscode-support
description: >
Interact with vscode to manage workspaces and projects.
state: open

collaborators:
- username: acovaci
- username: scarab5q
- username: acovaci
- username: scarab5q

branches:
- name: main
protection:
required_pull_request_reviews:
required_approving_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
- name: main
protection:
required_pull_request_reviews:
required_approving_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true

required_status_checks:
strict: true
contexts:
- "build"
- "pre-commit"
required_status_checks:
strict: true
contexts:
- build
- pre-commit

enforce_admins: false
restrictions: null
enforce_admins: false
restrictions:
23 changes: 12 additions & 11 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
name: Pre-Commit

on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
on: # yamllint disable-line rule:truthy
pull_request:
branches: [main]
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
29 changes: 15 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
---
name: Rust

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
on: # yamllint disable-line rule:truthy
push:
branches: [main]
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
69 changes: 41 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
types_or: [yaml]
- id: check-toml
types_or: [toml]
- id: check-executables-have-shebangs
types_or: [shell, text]
- id: check-shebang-scripts-are-executable
types_or: [shell, text]
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-crlf
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: cargo-check
- id: clippy
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
types: [yaml]
- id: check-toml
types: [toml]
- id: check-executables-have-shebangs
types_or: [shell, text]
- id: check-shebang-scripts-are-executable
types_or: [shell, text]
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-crlf
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
types: [rust]
- id: cargo-check
types: [rust]
- id: clippy
types: [rust]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: [--format, parsable, --strict]
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]

0 comments on commit bfd6b0e

Please sign in to comment.