TypeStat icon indicating copy to clipboard operation
TypeStat copied to clipboard

🐛 Bug: Collecting included files possibly missing bunch of them

Open rubiesonthesky opened this issue 10 months ago • 1 comments

Bug Report Checklist

  • [X] I have tried restarting my IDE and the issue persists.
  • [X] I have pulled the latest main branch of the repository.
  • [X] I have searched for related issues and found none that matched my issue.

Expected

I expected code to collect all files that match include from compilerOptions: [ 'src', 'test/*.ts' ]

Actual

In practice, it seems that only these files where matched

[
  'test/postProcessing.test.ts',
  'test/infiniteWaveDetection.test.ts',
  'test/include.test.ts',
  'test/fixStrictNonNullAssertions.test.ts',
  'test/fixNoInferableTypes.test.ts',
  'test/fixNoImplicitThis.test.ts',
  'test/fixNoImplicitAny.test.ts',
  'test/fixMissingProperties.test.ts',
  'test/fixIncompleteTypes.test.ts',
  'test/fixImportExtensions.test.ts',
  'test/filters.test.ts',
  'test/files.test.ts',
  'test/customMutators.test.ts',
  'test/cleanups.test.ts'
]

Additional Info

I added logging to parseRawCompilerOptions to check what is doing with include. It's read correctly as [ 'src', 'test/*.ts' ] but then parseJsonConfigFileContent.filenames sets it to be just those files mentioned in Actual section.

There is mutation test for include, but it seems that the test setup does not use parseRawCompilerOptions at all. So it's not actually tested.

This manifest so that suppressTypeErrors is adding a lot ts-expect-error comments all around about things that are not problems.

rubiesonthesky avatar Apr 04 '24 20:04 rubiesonthesky