File tree Expand file tree Collapse file tree 4 files changed +84
-4
lines changed
Expand file tree Collapse file tree 4 files changed +84
-4
lines changed Original file line number Diff line number Diff line change 55 },
66 {
77 "pattern" : " ^https://localhost"
8+ },
9+ {
10+ "pattern" : " ^https://crates\\ .io/crates/rust-guardian"
11+ },
12+ {
13+ "pattern" : " ^https://crates\\ .io/me"
14+ },
15+ {
16+ "pattern" : " ^https://crates\\ .io/$"
17+ },
18+ {
19+ "pattern" : " ^CONTRIBUTING\\ .md$"
820 }
921 ],
1022 "replacementPatterns" : [],
Original file line number Diff line number Diff line change @@ -114,7 +114,9 @@ jobs:
114114 uses : dtolnay/rust-toolchain@nightly
115115
116116 - name : Install minimal-versions
117- run : cargo install cargo-minimal-versions
117+ run : |
118+ cargo install cargo-minimal-versions
119+ cargo install cargo-hack
118120
119121 - name : Check minimal versions
120122 run : cargo minimal-versions check
Original file line number Diff line number Diff line change 1+ # Contributing to Rust Guardian
2+
3+ Thank you for your interest in contributing to Rust Guardian!
4+
5+ ## Getting Started
6+
7+ 1 . Fork the repository
8+ 2 . Clone your fork: ` git clone https://github.com/YOUR_USERNAME/rust-guardian.git `
9+ 3 . Create a new branch: ` git checkout -b feature/your-feature-name `
10+
11+ ## Development Setup
12+
13+ ### Prerequisites
14+
15+ - Rust 1.70 or higher
16+ - Cargo (comes with Rust)
17+
18+ ### Building
19+
20+ ``` bash
21+ cargo build
22+ ```
23+
24+ ### Running Tests
25+
26+ ``` bash
27+ cargo test
28+ ```
29+
30+ ### Running Locally
31+
32+ ``` bash
33+ cargo run -- check src/
34+ ```
35+
36+ ## Code Quality
37+
38+ Before submitting a pull request, make sure your code:
39+
40+ 1 . Passes all tests: ` cargo test `
41+ 2 . Passes clippy checks: ` cargo clippy --all-targets --all-features -- -D warnings `
42+ 3 . Is properly formatted: ` cargo fmt --all -- --check `
43+
44+ ## Submitting Changes
45+
46+ 1 . Commit your changes with clear, descriptive commit messages
47+ 2 . Push to your fork
48+ 3 . Create a pull request against the ` main ` branch
49+ 4 . Describe your changes in the PR description
50+
51+ ## Questions?
52+
53+ If you have questions, please open an issue on GitHub.
54+
55+ ## License
56+
57+ By contributing to Rust Guardian, you agree that your contributions will be licensed under the MIT License.
Original file line number Diff line number Diff line change @@ -246,9 +246,18 @@ impl ReportFormatter {
246246
247247 /// Check if the current environment supports ANSI color codes
248248 fn supports_ansi_colors ( ) -> bool {
249- // Basic heuristic - in production this would check terminal capabilities
250- std:: env:: var ( "NO_COLOR" ) . is_err ( )
251- && ( std:: env:: var ( "TERM" ) . is_ok_and ( |term| term != "dumb" ) )
249+ // Check if colors are explicitly disabled
250+ if std:: env:: var ( "NO_COLOR" ) . is_ok ( ) {
251+ return false ;
252+ }
253+
254+ // GitHub Actions and other CI systems support ANSI colors
255+ if std:: env:: var ( "GITHUB_ACTIONS" ) . is_ok ( ) || std:: env:: var ( "CI" ) . is_ok ( ) {
256+ return true ;
257+ }
258+
259+ // Check terminal capabilities
260+ std:: env:: var ( "TERM" ) . is_ok_and ( |term| term != "dumb" )
252261 }
253262
254263 /// Validate that a format operation produces expected structure
You can’t perform that action at this time.
0 commit comments