### Install slopscore-lint with pip extras Source: https://jman4162.github.io/slopscore Install the slopscore-lint package. The base install is lean and rule-based; the [report] extra adds HTML reports, [nlp] adds spaCy precision, and [all] installs everything. ```bash pip install slopscore-lint # lean, rule-based core pip install "slopscore-lint[report]" # + HTML reports pip install "slopscore-lint[nlp]" # + spaCy precision pip install "slopscore-lint[all]" # everything ``` -------------------------------- ### slopscore.toml configuration example Source: https://jman4162.github.io/slopscore/configuration Example configuration for slopscore, placed in slopscore.toml or under [tool.slopscore] in pyproject.toml. Sets profile, strictness, scorer, and CI gate options; the exclude list replaces the built-in defaults. CLI flags override these file values. ```toml # slopscore.toml (or under [tool.slopscore] in pyproject.toml) profile = "blog" # blog | essay | academic | marketing | technical | social strictness = "conservative" # conservative | balanced | sensitive scorer = "rules" # rules (default) | ml min_reliable_words = 300 suggest = false # include opt-in rewrite suggestions broad = false # include the opt-in broad rule tier (higher false-positive rate) # CI gate. Either condition exits 1. Abstained documents (under 100 words, non-English) never # fail on score, because their number is not a confident label. fail_on = "none" # none | low | medium | high: any rule hit at this severity fails score_threshold = 50 # any non-abstained document at or above this score fails # Batch walker filters (directory and multi-file scans). `exclude` REPLACES the defaults # (node_modules, .venv, venv, .git, vendor, dist, build, __pycache__, .tox, .mypy_cache, # .ruff_cache, site); patterns are root-relative globs or bare directory names. include = ["docs/*", "*.md"] exclude = ["node_modules", "build", "*.generated.md"] # Turn a whole dimension off (it then scores 0 and emits no findings): disabled_dimensions = ["formatting_tells"] # Turn individual rules off, or override their severity: disabled_rules = ["FORMULAIC_IN_CONCLUSION"] rule_severity = { "COPULA_SERVES_AS" = "low" } ``` -------------------------------- ### Scan prose inside code with slopscore-lint scan Source: https://jman4162.github.io/slopscore/code-and-fairness Use the scan command to extract prose from source files and check it for slop. The first example scans a single file, the second recursively scans a package, and the third scans a Markdown file with a fail-on threshold of high. Offsets in the report index the extracted prose, so SARIF and HTML line numbers are relative to that prose, not the raw source bytes. ```shell slopscore-lint scan src/app.py # docstrings + comments in one file slopscore-lint scan src/ --recursive # across a package slopscore-lint scan README.md --fail-on high ``` -------------------------------- ### Audit fairness with slopscore-lint fairness Source: https://jman4162.github.io/slopscore/code-and-fairness Use the fairness command to audit rule false-positive rates on plain and non-native English. The first example reports per-rule false-positive rates on the simple_english and non_native slices; the second adds a threshold of 0.1 to flag rules that fire over 10 percent. Document-level false positives are 0 percent on both slices, and two performative_candor rules fire at the rule level but do not push a document over the threshold. ```shell slopscore-lint fairness # per-rule false-positive rate on plain/ESL text slopscore-lint fairness --threshold 0.1 # flag rules over 10 percent ``` -------------------------------- ### Scan files with slopscore-lint CLI Source: https://jman4162.github.io/slopscore Run slopscore-lint scan on a file or directory. Use --recursive --fail-on high for CI gating, --format sarif -o out.sarif for GitHub code scanning, --suggest for rewrite suggestions, and --broad for the broad tier (jargon + bare weasel words). ```bash slopscore-lint scan post.md slopscore-lint scan ./content --recursive --fail-on high # CI gate slopscore-lint scan post.md --format sarif -o out.sarif # GitHub code scanning slopscore-lint scan post.md --suggest # opt-in rewrite suggestions slopscore-lint scan post.md --broad # opt-in broad tier (jargon + bare weasel words) ``` -------------------------------- ### Record and Scan with Baseline Source: https://jman4162.github.io/slopscore/baseline Record current findings to a baseline file and use that file in CI to gate only on new findings. ```bash # 1. Record current findings (commit the result). slopscore-lint baseline ./content --recursive -o .slopscore-baseline.json # 2. In CI, gate only on findings not in the baseline. slopscore-lint scan ./content --recursive \ --baseline-file .slopscore-baseline.json --fail-on-new ``` -------------------------------- ### Inline suppression with slopscore-disable comments Source: https://jman4162.github.io/slopscore/suppression Use these HTML comments to suppress SlopScore findings inline. `disable-next-line` silences the next line, `disable-line` silences the current line, `disable`/`enable` wrap a block, and `disable-file` suppresses the entire file. Names are comma-separated rule IDs or dimension names; omitting them suppresses everything. Unknown names produce a warning. ```html Everyone knows this is the future. This line is fine. A block where significance-inflation findings are ignored … Suppress every finding in this file (e.g. generated content). ``` -------------------------------- ### Triage a long document with slopscore-lint scan --by-paragraph Source: https://jman4162.github.io/slopscore/code-and-fairness Use the --by-paragraph flag with scan to score each paragraph and print them worst-first, so you can find the section to fix in a long document. Short paragraphs abstain, so treat this as triage, not a per-paragraph verdict. ```shell slopscore-lint scan article.md --by-paragraph ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.