scan.ignore: optional match on the finding title, to accept one check of a rule with several (e.g. the ALL CAPS title in play-metadata)
This commit is contained in:
parent
dc52eaa923
commit
43daeef97f
6 changed files with 12 additions and 7 deletions
|
|
@ -240,6 +240,11 @@ describe('Google Play rules', () => {
|
|||
const soft = await scanVariant('play-listing', { 'store/listing.md': s => s.replace('🔥 #1 Best Free Photo Saver App Pro', 'Free Photo Saver') });
|
||||
expect(soft.findings.filter(f => f.rule === 'play-metadata' && f.title.includes('Free Photo Saver')).map(f => f.severity)).toEqual(['low']);
|
||||
expect(rules(await scan('ios-native').then(x => x.findings), 'play').size).toBe(0);
|
||||
// scan.ignore with match: accepts the ALL CAPS check of play-metadata only, the other metadata checks stay open
|
||||
const caps = await scanVariant('play-listing', { 'storebound.config.ts': s => s.replace(/\n(\s*)app: \{/, "\n$1scan: { ignore: [{ rule: 'play-metadata', match: 'ALL CAPS', reason: 'brand name' }] },\n$1app: {") });
|
||||
const md = caps.findings.filter(f => f.rule === 'play-metadata');
|
||||
expect(md.find(f => f.title.includes('ALL CAPS'))!.accepted).toBe('brand name');
|
||||
expect(md.filter(f => !f.title.includes('ALL CAPS')).every(f => !f.accepted)).toBe(true);
|
||||
});
|
||||
test('the policy tables cite their sources', () => {
|
||||
for (const u of Object.values(PLAY_REFS)) expect(u).toMatch(/^https:\/\//);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue