Skip to content

Commit

Permalink
fix: logic on local ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Jun 21, 2022
1 parent 0cc41a0 commit 9667a6e
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/sourceTracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,21 +760,16 @@ export class SourceTracking extends AsyncCreatable {

private localChangesToOutputRow(input: ChangeResult, localType: 'delete' | 'modify' | 'add'): StatusOutputRow[] {
this.logger.debug('converting ChangeResult to a row', input);

const baseObject = {
type: input.type ?? '',
origin: 'local',
state: localType,
fullName: input.name ?? '',
// ignored property will be set in populateTypesAndNames
ignored: input.ignored ?? false,
};
this.forceIgnore ??= ForceIgnore.findAndCreate(this.project.getDefaultPackage().path);

if (input.filenames) {
return input.filenames.map((filename) => ({
...baseObject,
type: input.type ?? '',
state: localType,
fullName: input.name ?? '',
filePath: filename,
origin: 'local',
ignored: this.forceIgnore.denies(filename),
}));
}
throw new Error('no filenames found for local ChangeResult');
Expand Down

0 comments on commit 9667a6e

Please sign in to comment.