-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4251b62
commit cb8d608
Showing
16 changed files
with
776 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Top-most EditorConfig file | ||
root = true | ||
|
||
# All files | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# Rust files | ||
[*.rs] | ||
indent_style = space | ||
indent_size = 4 | ||
max_line_length = 100 | ||
|
||
# TOML files (like Cargo.toml) | ||
[*.toml] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Cargo Build & Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build_and_test: | ||
name: Rust project - latest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- stable | ||
- beta | ||
#- nightly | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | ||
- run: cargo build --verbose | ||
- run: cargo test --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: pre-commit | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
.metadata/ | ||
*.cache | ||
sandbox.services/ | ||
# Apple's crap | ||
.DS_Store | ||
*~ | ||
sandbox.* | ||
*.iml | ||
*.ipr | ||
*.iws | ||
keystore | ||
/.idea/ | ||
.settings | ||
.directory | ||
target | ||
*/.svn/* | ||
**/.svn/* | ||
**/bin/* | ||
/.svn/ | ||
net.modelbased.sensapp.backyard.weather/src/main/resources/ | ||
|
||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[general] | ||
# Ignore rules, reference them by id or name (comma-separated) | ||
ignore=body-is-missing,CC1 | ||
|
||
contrib=contrib-title-conventional-commits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
- id: check-json | ||
- id: check-yaml | ||
- id: check-xml | ||
- id: check-ast | ||
- id: end-of-file-fixer | ||
- id: check-merge-conflict | ||
- id: no-commit-to-branch # no commits to main | ||
- repo: https://github.com/gitleaks/gitleaks | ||
rev: v8.18.1 | ||
hooks: | ||
- id: gitleaks | ||
- repo: https://github.com/jorisroovers/gitlint | ||
rev: v0.19.1 | ||
hooks: | ||
- id: gitlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"recommendations": [ | ||
"matklad.rust-analyzer", | ||
"serayuzgur.crates", | ||
"EditorConfig.EditorConfig", | ||
"bungcip.better-toml", | ||
"vadimcn.vscode-lldb", | ||
"usernamehw.errorlens" | ||
], | ||
"unwantedRecommendations": [ | ||
"rust-lang.rust-vscode" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug executable 'sensapp'", | ||
"cargo": { | ||
"args": [ | ||
"build", | ||
"--bin=sensapp", | ||
"--package=sensapp" | ||
], | ||
"filter": { | ||
"name": "sensapp", | ||
"kind": "bin" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug unit tests in executable 'sensapp'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--bin=sensapp", | ||
"--package=sensapp" | ||
], | ||
"filter": { | ||
"name": "sensapp", | ||
"kind": "bin" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributing | ||
|
||
Thank you for your contributions in making SensApp better! | ||
|
||
## Discuss Changes | ||
|
||
For significant changes, please open an issue first to discuss what you would like to change. This helps us align your contributions with our project goals. | ||
|
||
## Pre-commits hooks | ||
|
||
Please use pre-commits hooks to check your changes locally. Your change will also be checked by the continuous integration (CI) pipeline, but it is faster to catch errors locally before pushing your changes. | ||
|
||
``` | ||
pip install pre-commit | ||
pre-commit install | ||
pre-commit install --hook-type commit-msg | ||
``` | ||
|
||
## Language | ||
|
||
We use Rust. | ||
|
||
## Code Style | ||
|
||
We follow the [Rust Style Guide](https://github.com/rust-lang/rust/tree/HEAD/src/doc/style-guide/src). | ||
|
||
## Tests | ||
|
||
Update tests as appropriate. New features should come with additional tests. | ||
|
||
## Documentation | ||
|
||
**Documentation**: Update the `README.md` or other documentation with details of changes to the interface or additional features. | ||
|
||
## Issues | ||
|
||
Make sure you use the latest version of SensApp and please include enough information about the issue. The more information you provide, the easier it is to reproduce the issue and to fix it. | ||
|
||
## ~~Pull~~ Merge Requests | ||
|
||
You are not allowed to push to the `main` branch. Please create a merge request instead. | ||
|
||
Please do NOT `squash` your merge requests. You are welcome to organise and clean your commits first, but we want to keep the commit history. | ||
|
||
Avoid merging your own pull requests without a review. Do not merge a pull request with failing tests. | ||
|
||
## Commit Messages | ||
|
||
We use [Conventional Commits](https://www.conventionalcommits.org/). | ||
|
||
``` | ||
<type>[(optional scope)]: <description> | ||
[optional body] | ||
[optional footer(s)] | ||
``` | ||
|
||
Examples: | ||
|
||
``` | ||
fix: prevent infinite loop when it rains | ||
docs(architecture): correct spelling of banana | ||
``` | ||
|
||
Valid types are: fix, feat, chore, docs, style, refactor, perf, test, revert, ci, and build. | ||
|
||
To please the [gitmoji](https://gitmoji.dev) enthousiasts, unicode emojis are allowed but not enforced. Commit messages with emojis still must respect the conventional commit format. | ||
|
||
Examples: | ||
``` | ||
fix: π prevent infinite loop when it rains | ||
docs(architecture): π correct spelling of banana | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "sensapp" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
Oops, something went wrong.