Skip to content

Commit

Permalink
Merge pull request #33 from sgb-io/feat/refactor-internals
Browse files Browse the repository at this point in the history
* WIP refactoring internals

* Shift a mod statement

* Remove declarations. (#34)

* Remove a dead_code suppression

* Enable test coverage output, build all PRs (#37)

* Flatten file walking (#36)

* Flatten file walking logic

* Refactor Output (#38)

* - Change output flag to accept csv, json & table

- Add Comfy Table to handle cli table output.
- Minor filewalk tweaks
- Fix linked project on Linux.

* Moved output

Moved timings

* Add project arg default value.

* Remove comments

* Remove reference to a metrics/perf module.

* Add cli flag descriptions

Revert breaking change to json flag.

* Set possible values for format.

---------

Co-authored-by: Ben Collins <[email protected]>

* Update lockfile

* Add several tests for Halstead

* Refactor and cover the Halstead module (#39)

* Improve correctness and coverage of Halstead WIP

* Add further test cases and remove more duplicate analysis

* Tidy up changes, make output consistent

* Nicer test names

* Break apart utils from main module, add some tests

* Run cargo fmt

* Update output module to return a string, add tests

* Add minimum coverage level

---------

Co-authored-by: Ben Collins <[email protected]>
  • Loading branch information
sgb-io and bencollins54 authored Jul 2, 2023
2 parents b53e664 + b845d8f commit 94a3911
Show file tree
Hide file tree
Showing 26 changed files with 1,632 additions and 936 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[build]
jobs = 8

rustdocflags = ["--cfg", "docsrs"]
rustflags = []
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main]
pull_request:
branches: [main]
branches: ['*']

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -42,3 +42,8 @@ jobs:
with:
command: test
args: --all-features

- name: Output test coverage
run: |
cargo install cargo-tarpaulin
cargo tarpaulin --fail-under 75
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
target
debug.log
release
node_modules
node_modules
tarpaulin-report.html
build_rs_cov.profraw
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"rust-analyzer.linkedProjects": [".\\crates\\fta-wasm\\Cargo.toml"]
}
"rust-analyzer.linkedProjects": ["./crates/fta-wasm/Cargo.toml"],
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true
},
}
Loading

0 comments on commit 94a3911

Please sign in to comment.