mirror of
https://github.com/stablyai/orca.git
synced 2026-09-21 16:02:20 +00:00
fix(quality-gate): let the changed-code gate see the focused import plugins (#20912)
import/no-duplicates was reachable only through the repo-wide CI audit, so an author's first signal was a red static analysis job after push.
This commit is contained in:
@@ -24,6 +24,17 @@ export const OXLINT_SCANS = [
|
||||
label: 'casting code quality',
|
||||
args: ['--config', 'config/oxlint-code-quality-casting.json']
|
||||
},
|
||||
{
|
||||
// Why the allow: CI's `audit:code-quality:native` runs before the mobile install, so it can
|
||||
// never see a cycle inside mobile/ — locally, where mobile/node_modules exists, it would.
|
||||
label: 'focused plugins',
|
||||
args: [
|
||||
'--config',
|
||||
'config/oxlint-code-quality-native-plugins.json',
|
||||
'--allow',
|
||||
'import/no-cycle'
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'type-aware code quality',
|
||||
args: ['--type-aware', '--config', 'config/oxlint-code-quality-type-aware.json']
|
||||
|
||||
@@ -57,6 +57,16 @@ describe('changed-code quality line matching', () => {
|
||||
expect(scan.args).not.toContain('--disable-nested-config')
|
||||
})
|
||||
|
||||
// Why: import/no-duplicates was reachable only through the repo-wide CI audit, so it first
|
||||
// surfaced after push. The cycle rule stays out because CI's audit runs before the mobile install.
|
||||
it('runs the focused plugin config the repo-wide audit enforces, minus the cycle rule', () => {
|
||||
const scan = OXLINT_SCANS.find((candidate) => candidate.label === 'focused plugins')
|
||||
|
||||
expect(scan.args).toContain('config/oxlint-code-quality-native-plugins.json')
|
||||
expect(scan.args).toContain('import/no-cycle')
|
||||
expect(scan.args[scan.args.indexOf('import/no-cycle') - 1]).toBe('--allow')
|
||||
})
|
||||
|
||||
it('leaves Cloud source to the independent Cloud quality checks', () => {
|
||||
expect(isRootCodeQualityPath('cloud/apps/relay/src/index.ts')).toBe(false)
|
||||
expect(isRootCodeQualityPath('src/main/index.ts')).toBe(true)
|
||||
|
||||
Reference in New Issue
Block a user