Adding Microsoft SECURITY.MD#1
Merged
parthopdas merged 1 commit intoJul 26, 2026
Merged
Conversation
parthopdas
added a commit
that referenced
this pull request
Jul 27, 2026
Faithful 1:1 port of crap4java CrapAnalyzer — the flat S4 composition layer that reads the changed files and drives both parsers (T9 CSharpMethodParser, T10 CoberturaCoverageParser), composing CrapScore + MethodMetrics. - Exact->nearest-line->N/A coverage lookup keyed on the FROZEN reciprocal TypeName#method:line form (byte-for-byte aligned with T10; trailing ":" is load-bearing). InvariantCulture line formatting (departure #3); Ordinal comparisons throughout. - N/A discipline (W4 / departure #1): a missing lookup yields null, never 0.0; 0%-present vs absent preserved end-to-end. - Stable OrderBy(...).ThenByDescending(...), N/A last (not List.Sort). - Resolve-once (departure #7): flat — no module-grouping loop (a T14 concern). - Public tested helpers LookupCoverage/NearestCoverage/ParseTrailingLine (internal banned, C1); ExactCoverage private (least privilege). - Drops Java classNameFromSource + dead projectRoot param (D-T9; behaviour migrated to T9). 17 tests: P1-P9 faithful ports + C1-C8 C#-specific. Build 0/0 Release (warnings-as-errors); 85/85 tests green, deterministic x2. docs/decisions.md: add T11 register (frozen-consumer discharged, D-T11a/b, W-T11a/b/c). Backfill T10 SHA 87488ce; flip T11 -> Done. Verified by Bhaskar (PASS); design-reviewed by Anders (GREEN). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
parthopdas
added a commit
that referenced
this pull request
Jul 27, 2026
Faithful 1:1 port of crap4java CliApplication/Main (execute/parseArguments/ filesForMode/explicitFiles/maxCrap/thresholdExceeded), module-loop removed (departure #7 resolve-once). Composes shipped types only; no new behavioral departure beyond the approved set #1-#8. - Fail-fast gate (departure #1), three greppable stderr anchors: 1) Locate -> null => "No coverage report was produced" => exit 1 2) Parse(report).Count == 0 => "contained no coverage data" => exit 1 (checks coverageMap.Count, not metrics) 3) CoverageRunner throw propagates ("Coverage command failed with exit") => realized as exit 1 at T15 - Exit-code table owned by T14: 0 (help / no files / max<=8.0), 1 (parse error / fail-fast / propagated), 2 (MaxCrap>8.0 strict -> "CRAP threshold exceeded: {max:F1} > 8.0", InvariantCulture). - Double-parse locked (option A); Analyze(map) overload deferred (Mr. Das). - Execute does NOT catch runner/parser throw (Java parity); T15 Program.Main bare-catch -> exit 1 realizes it (D-T14d). 17 parity tests (fake ICommandExecutor, no real dotnet test). 112 tests green x2, 0/0 Release. Bhaskar PASS, Anders green. T14 register + tracker updated. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please accept this contribution adding the standard Microsoft SECURITY.MD 🔒 file to help the community understand the security policy and how to safely report security issues. GitHub uses the presence of this file to light-up security reminders and a link to the file. This pull request commits the latest official SECURITY.MD file from https://github.com/microsoft/repo-templates/blob/main/shared/SECURITY.md.
Microsoft teams can learn more about this effort and share feedback within the open source guidance available internally.