plasma-umass / cwhy

"See why!" Explains and suggests fixes for compile-time errors for C, C++, C#, Go, Java, LaTeX, PHP, Python, Ruby, Rust, and TypeScript
Apache License 2.0
273 stars 6 forks source link

Including/excluding files in certain paths #17

Open nicovank opened 1 year ago

nicovank commented 1 year ago

Moving discussion about include/exclude over from https://github.com/plasma-umass/cwhy/pull/16.

A few notes/ideas:

  1. Omit files whose owner is not the current user? This would not work for Python for example where pip often installs packages in user mode, but for C/C++ and Latex it would probably work pretty well.
  2. Selecting sub-directories of the current working directory could cause issues in C/C++, where include files are typically separated from source files, and the compiler may enter a sub-directory to compile its source files (hence leaving the root where the include files would be matched).
  3. With a build tool (CMake for C++, Maven for Java), dependencies can be installed inside a sub-directory at the root. This is also maybe a case other than standard library / packages where excluding directories could be useful.