Skip to content

Commit

Permalink
fix: more formatting enforcement
Browse files Browse the repository at this point in the history
  • Loading branch information
kristof-mattei committed Feb 22, 2023
1 parent 1035dba commit 4825d45
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 100 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/yml-lint.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: Lint Yaml
name: Lint

on:
workflow_dispatch:
push:
branches:
- main
paths:
- "**/*.yml"
- "**/*.yaml"
pull_request:
paths:
- "**/*.yml"
- "**/*.yaml"
branches:
- main

jobs:
lint:
Expand All @@ -36,4 +32,4 @@ jobs:
- name: Run linter
shell: bash
run: |
npx --no-install prettier -c "**/*.{yml,yaml}"
npx --no-install prettier --check .
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
.git
.github/actions/
profiling
reports
src # rust-fmt
tests # rust-fmt
target
6 changes: 6 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ overrides:
- "**/*.json"
options:
tabWidth: 4
trailingComma: all
- files:
- "package.json"
- "package-lock.json"
options:
tabWidth: 2
154 changes: 68 additions & 86 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,88 +1,70 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "cargo",
"command": "check",
"problemMatcher": [
"$rustc"
],
"group": "build",
"label": "Rust: cargo check"
},
{
"type": "cargo",
"command": "clean",
"problemMatcher": [
"$rustc"
],
"group": "build",
"label": "Rust: cargo clean"
},
{
"type": "cargo",
"command": "build",
"args": [],
"problemMatcher": [
"$rustc"
],
"group": "build",
"label": "Rust: cargo build"
},
{
"type": "cargo",
"command": "fmt",
"args": [
"--all",
],
"problemMatcher": [
"$rustc"
],
"group": "build",
"label": "Rust: cargo fmt"
},
{
"type": "cargo",
"command": "clippy",
"args": [
"--workspace",
"--all-targets",
"--all-features",
"--",
"--deny",
"clippy::all",
"--deny",
"clippy::pedantic",
"--deny",
"clippy::cargo",
],
"problemMatcher": [
"$rustc"
],
"group": "build",
"label": "Rust: cargo clippy"
},
{
"type": "cargo",
"command": "test",
"args": [],
"problemMatcher": [
"$rustc"
],
"group": "test",
"label": "Rust: cargo test"
},
{
"type": "cargo",
"command": "test",
"args": [
"--release"
],
"problemMatcher": [
"$rustc"
],
"group": "test",
"label": "Rust: cargo test release"
},
]
"version": "2.0.0",
"tasks": [
{
"type": "cargo",
"command": "check",
"problemMatcher": ["$rustc"],
"group": "build",
"label": "Rust: cargo check"
},
{
"type": "cargo",
"command": "clean",
"problemMatcher": ["$rustc"],
"group": "build",
"label": "Rust: cargo clean"
},
{
"type": "cargo",
"command": "build",
"args": [],
"problemMatcher": ["$rustc"],
"group": "build",
"label": "Rust: cargo build"
},
{
"type": "cargo",
"command": "fmt",
"args": ["--all"],
"problemMatcher": ["$rustc"],
"group": "build",
"label": "Rust: cargo fmt"
},
{
"type": "cargo",
"command": "clippy",
"args": [
"--workspace",
"--all-targets",
"--all-features",
"--",
"--deny",
"clippy::all",
"--deny",
"clippy::pedantic",
"--deny",
"clippy::cargo"
],
"problemMatcher": ["$rustc"],
"group": "build",
"label": "Rust: cargo clippy"
},
{
"type": "cargo",
"command": "test",
"args": [],
"problemMatcher": ["$rustc"],
"group": "test",
"label": "Rust: cargo test"
},
{
"type": "cargo",
"command": "test",
"args": ["--release"],
"problemMatcher": ["$rustc"],
"group": "test",
"label": "Rust: cargo test release"
}
]
}
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Rust end-to-end application

It's written in Rust!

This is a framework for building Rust applications in combination with building Docker containers and never rebuilding code on release, instead we promote existing code.

## TODO and done
* [x] Figure out how to deal with PRs pushing too many Docker containers<br />

- [x] Figure out how to deal with PRs pushing too many Docker containers<br />
> We only build containers on the tip of the PR, so even if you're pushing 10 commits, we'll only build one.
* [ ] Remove old containers when the new one gets build for a PR?<br />
Or rely on a general weekly untagged cleanup?
* [ ] Remove PR containers when PR closed<br />
- [ ] Remove old containers when the new one gets build for a PR?<br />
Or rely on a general weekly untagged cleanup?
- [ ] Remove PR containers when PR closed<br />
> API currently unavailable
* [x] How do we deal with older containers on `main`?<br />
- [x] How do we deal with older containers on `main`?<br />
> We move tags, so we'll need to wait for the API to clean up untagged versions
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "It's written in Rust!",
"main": "src/main.rs",
"scripts": {
"prettier": "prettier -w \"**/*.{yml,yaml}\"",
"prettier": "prettier --write .",
"release": "semantic-release"
},
"engines": {
Expand Down

0 comments on commit 4825d45

Please sign in to comment.