Class: Scryer::Configuration
- Inherits:
-
Object
- Object
- Scryer::Configuration
- Defined in:
- lib/scryer.rb
Instance Attribute Summary collapse
-
#ai_client ⇒ Object
branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch fromgit rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main"). -
#branch ⇒ Object
branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch fromgit rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main"). -
#detect_duplicates ⇒ Object
branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch fromgit rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main"). -
#dirs ⇒ Object
branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch fromgit rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main"). -
#project_name ⇒ Object
branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch fromgit rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main"). -
#skip_rules ⇒ Object
branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch fromgit rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main").
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
57 58 59 60 61 |
# File 'lib/scryer.rb', line 57 def initialize @dirs = Scryer::Scanner::DEFAULT_GLOB_DIRS @skip_rules = [] @detect_duplicates = true end |
Instance Attribute Details
#ai_client ⇒ Object
branch, when set, overrides the git_branch value recorded in the
report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't
necessarily the one the scan happens to run on (e.g. a CI runner in
detached-HEAD state, or you always want releases attributed to "main").
ai_client, when set, opts into rewriting every finding's
suggested_fix via an LLM (see README's "AI-assisted fix
suggestions") — any object or Proc responding to #call(prompt) (or
#complete(prompt)). nil by default: off, no network calls, no
provider assumed.
skip_rules silences specific checks by rule_id (e.g. a known false
positive on this codebase) without editing/removing the rule itself —
strings or symbols, matched against each Rule's rule_id. Empty by
default: every registered rule runs. The scryer executable's
--skip RULE_ID flag adds to this list for a single run rather than
replacing it.
detect_duplicates toggles duplicate-code detection (method/query/
cache-key similarity across models, controllers, helpers, and
concerns — see Scryer::DuplicateDetector) on or off. true by
default, matching this gem's existing behavior. Duplicate detection
isn't a Scryer::Rule, so it has no rule_id and skip_rules can't
address it — set this to false instead (or pass --no-duplicates /
SCRYER_NO_DUPLICATES=1 for a single run without changing the
configured default) if it's too noisy or too slow for a given project.
55 56 57 |
# File 'lib/scryer.rb', line 55 def ai_client @ai_client end |
#branch ⇒ Object
branch, when set, overrides the git_branch value recorded in the
report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't
necessarily the one the scan happens to run on (e.g. a CI runner in
detached-HEAD state, or you always want releases attributed to "main").
ai_client, when set, opts into rewriting every finding's
suggested_fix via an LLM (see README's "AI-assisted fix
suggestions") — any object or Proc responding to #call(prompt) (or
#complete(prompt)). nil by default: off, no network calls, no
provider assumed.
skip_rules silences specific checks by rule_id (e.g. a known false
positive on this codebase) without editing/removing the rule itself —
strings or symbols, matched against each Rule's rule_id. Empty by
default: every registered rule runs. The scryer executable's
--skip RULE_ID flag adds to this list for a single run rather than
replacing it.
detect_duplicates toggles duplicate-code detection (method/query/
cache-key similarity across models, controllers, helpers, and
concerns — see Scryer::DuplicateDetector) on or off. true by
default, matching this gem's existing behavior. Duplicate detection
isn't a Scryer::Rule, so it has no rule_id and skip_rules can't
address it — set this to false instead (or pass --no-duplicates /
SCRYER_NO_DUPLICATES=1 for a single run without changing the
configured default) if it's too noisy or too slow for a given project.
55 56 57 |
# File 'lib/scryer.rb', line 55 def branch @branch end |
#detect_duplicates ⇒ Object
branch, when set, overrides the git_branch value recorded in the
report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't
necessarily the one the scan happens to run on (e.g. a CI runner in
detached-HEAD state, or you always want releases attributed to "main").
ai_client, when set, opts into rewriting every finding's
suggested_fix via an LLM (see README's "AI-assisted fix
suggestions") — any object or Proc responding to #call(prompt) (or
#complete(prompt)). nil by default: off, no network calls, no
provider assumed.
skip_rules silences specific checks by rule_id (e.g. a known false
positive on this codebase) without editing/removing the rule itself —
strings or symbols, matched against each Rule's rule_id. Empty by
default: every registered rule runs. The scryer executable's
--skip RULE_ID flag adds to this list for a single run rather than
replacing it.
detect_duplicates toggles duplicate-code detection (method/query/
cache-key similarity across models, controllers, helpers, and
concerns — see Scryer::DuplicateDetector) on or off. true by
default, matching this gem's existing behavior. Duplicate detection
isn't a Scryer::Rule, so it has no rule_id and skip_rules can't
address it — set this to false instead (or pass --no-duplicates /
SCRYER_NO_DUPLICATES=1 for a single run without changing the
configured default) if it's too noisy or too slow for a given project.
55 56 57 |
# File 'lib/scryer.rb', line 55 def detect_duplicates @detect_duplicates end |
#dirs ⇒ Object
branch, when set, overrides the git_branch value recorded in the
report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't
necessarily the one the scan happens to run on (e.g. a CI runner in
detached-HEAD state, or you always want releases attributed to "main").
ai_client, when set, opts into rewriting every finding's
suggested_fix via an LLM (see README's "AI-assisted fix
suggestions") — any object or Proc responding to #call(prompt) (or
#complete(prompt)). nil by default: off, no network calls, no
provider assumed.
skip_rules silences specific checks by rule_id (e.g. a known false
positive on this codebase) without editing/removing the rule itself —
strings or symbols, matched against each Rule's rule_id. Empty by
default: every registered rule runs. The scryer executable's
--skip RULE_ID flag adds to this list for a single run rather than
replacing it.
detect_duplicates toggles duplicate-code detection (method/query/
cache-key similarity across models, controllers, helpers, and
concerns — see Scryer::DuplicateDetector) on or off. true by
default, matching this gem's existing behavior. Duplicate detection
isn't a Scryer::Rule, so it has no rule_id and skip_rules can't
address it — set this to false instead (or pass --no-duplicates /
SCRYER_NO_DUPLICATES=1 for a single run without changing the
configured default) if it's too noisy or too slow for a given project.
55 56 57 |
# File 'lib/scryer.rb', line 55 def dirs @dirs end |
#project_name ⇒ Object
branch, when set, overrides the git_branch value recorded in the
report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't
necessarily the one the scan happens to run on (e.g. a CI runner in
detached-HEAD state, or you always want releases attributed to "main").
ai_client, when set, opts into rewriting every finding's
suggested_fix via an LLM (see README's "AI-assisted fix
suggestions") — any object or Proc responding to #call(prompt) (or
#complete(prompt)). nil by default: off, no network calls, no
provider assumed.
skip_rules silences specific checks by rule_id (e.g. a known false
positive on this codebase) without editing/removing the rule itself —
strings or symbols, matched against each Rule's rule_id. Empty by
default: every registered rule runs. The scryer executable's
--skip RULE_ID flag adds to this list for a single run rather than
replacing it.
detect_duplicates toggles duplicate-code detection (method/query/
cache-key similarity across models, controllers, helpers, and
concerns — see Scryer::DuplicateDetector) on or off. true by
default, matching this gem's existing behavior. Duplicate detection
isn't a Scryer::Rule, so it has no rule_id and skip_rules can't
address it — set this to false instead (or pass --no-duplicates /
SCRYER_NO_DUPLICATES=1 for a single run without changing the
configured default) if it's too noisy or too slow for a given project.
55 56 57 |
# File 'lib/scryer.rb', line 55 def project_name @project_name end |
#skip_rules ⇒ Object
branch, when set, overrides the git_branch value recorded in the
report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't
necessarily the one the scan happens to run on (e.g. a CI runner in
detached-HEAD state, or you always want releases attributed to "main").
ai_client, when set, opts into rewriting every finding's
suggested_fix via an LLM (see README's "AI-assisted fix
suggestions") — any object or Proc responding to #call(prompt) (or
#complete(prompt)). nil by default: off, no network calls, no
provider assumed.
skip_rules silences specific checks by rule_id (e.g. a known false
positive on this codebase) without editing/removing the rule itself —
strings or symbols, matched against each Rule's rule_id. Empty by
default: every registered rule runs. The scryer executable's
--skip RULE_ID flag adds to this list for a single run rather than
replacing it.
detect_duplicates toggles duplicate-code detection (method/query/
cache-key similarity across models, controllers, helpers, and
concerns — see Scryer::DuplicateDetector) on or off. true by
default, matching this gem's existing behavior. Duplicate detection
isn't a Scryer::Rule, so it has no rule_id and skip_rules can't
address it — set this to false instead (or pass --no-duplicates /
SCRYER_NO_DUPLICATES=1 for a single run without changing the
configured default) if it's too noisy or too slow for a given project.
55 56 57 |
# File 'lib/scryer.rb', line 55 def skip_rules @skip_rules end |