chore: import upstream snapshot with attribution
CI / license-header (push) Has been skipped
CI / e2e-dry-run (push) Has been skipped
CI / fast-gate (push) Failing after 0s
Test PR Label Logic / test-pr-labels (push) Failing after 1s
Skill Format Check / check-format (push) Failing after 2s
CI / security (push) Failing after 5s
CI / unit-test (push) Has been skipped
CI / lint (push) Has been skipped
CI / script-test (push) Has been skipped
CI / deterministic-gate (push) Has been skipped
CI / coverage (push) Has been skipped
CI / results (push) Has been cancelled
CI / deadcode (push) Has been cancelled
CI / e2e-live (push) Has been cancelled
CI / license-header (push) Has been skipped
CI / e2e-dry-run (push) Has been skipped
CI / fast-gate (push) Failing after 0s
Test PR Label Logic / test-pr-labels (push) Failing after 1s
Skill Format Check / check-format (push) Failing after 2s
CI / security (push) Failing after 5s
CI / unit-test (push) Has been skipped
CI / lint (push) Has been skipped
CI / script-test (push) Has been skipped
CI / deterministic-gate (push) Has been skipped
CI / coverage (push) Has been skipped
CI / results (push) Has been cancelled
CI / deadcode (push) Has been cancelled
CI / e2e-live (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
// Copyright (c) 2026 Lark Technologies Pte. Ltd.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
// Package lintapi defines the shared types every lint domain returns from
|
||||
// its scan entry point. New lint domains (sibling packages under lint/)
|
||||
// MUST return []lintapi.Violation so cmd/main can aggregate and report
|
||||
// uniformly. The domain may add its own private types for internal use.
|
||||
package lintapi
|
||||
|
||||
// Action enumerates the response modes for a violation.
|
||||
type Action string
|
||||
|
||||
const (
|
||||
// ActionReject hard-fails CI. Only REJECT contributes to a nonzero
|
||||
// lintcheck exit code.
|
||||
ActionReject Action = "REJECT"
|
||||
// ActionLabel emits a diagnostic so CI can label the PR but does not fail.
|
||||
ActionLabel Action = "LABEL"
|
||||
// ActionWarning surfaces a reviewer-attention note without failing CI.
|
||||
// CI does NOT exit nonzero on warnings; they are reviewer signal only.
|
||||
ActionWarning Action = "WARNING"
|
||||
)
|
||||
|
||||
// Violation describes a single lint hit. Rule identifies which check
|
||||
// produced it; the domain package owns the rule namespace.
|
||||
type Violation struct {
|
||||
Rule string
|
||||
Action Action
|
||||
File string
|
||||
Line int
|
||||
Message string
|
||||
Suggestion string
|
||||
}
|
||||
Reference in New Issue
Block a user