Skip to content

Commit cfeb6de

Browse files
committed
chore: fixed ignored ui
1 parent ab3b866 commit cfeb6de

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

packages/cli/src/ui/scan/printExplain.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ function printChecks(checks: {
136136
printContinuation(
137137
formatCheck('Not duplicated', !checks.isDuplicated, 'warning'),
138138
);
139-
printContinuation(formatCheck('Not ignored', !checks.isIgnored, 'warning'));
139+
140+
if (checks.isIgnored) {
141+
printContinuation(warning('⚠ Key is ignored'));
142+
}
140143
}
141144

142145
/**

packages/cli/test/unit/ui/scan/printExplain.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ describe('printExplain', () => {
249249
expect(allOutput.join('\n')).toContain('✘');
250250
});
251251

252-
it('shows ✘ Not ignored when isIgnored is true', () => {
252+
it('shows ⚠ warning when isIgnored is true', () => {
253253
printExplain(
254254
baseResult({
255255
definedIn: ['.env'],
@@ -258,9 +258,9 @@ describe('printExplain', () => {
258258
}),
259259
);
260260

261-
expect(allOutput.join('\n')).toContain('✘');
261+
expect(allOutput.join('\n')).toContain('⚠ Key is ignored');
262+
expect(allOutput.join('\n')).not.toContain('Not ignored');
262263
});
263-
264264
// ── structural output ────────────────────────────────────────────────────
265265

266266
it('prints the key name in the header', () => {

0 commit comments

Comments
 (0)