◐ Shell
clean mode source ↗

fixed #342/fixed #343 - do not treat directories like regular files in existence checks by firewave · Pull Request #339 · cppcheck-opensource/simplecpp

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@firewave

std::ifstream can open directories and read from them without issue. Nothing will be read though - it is like an empty file. This would have treated an include which actually pointed to a directory as existing (e.g. #include </>).

@firewave

No tests added since we still do not have tests for additional files ... but I just realized that certain directories always exists so at least on Linux it can be tested.

Moving code is problematic though as Cppcheck is GPL and this would re-license it under 0BSD.

@firewave

Moving code is problematic though as Cppcheck is GPL and this would re-license it under 0BSD.

@danmar

After we resolved and merged this we should create another release so we can sync it to Cppcheck.

@firewave firewave changed the title do not treat directories like regular files in existence checks fixed #342/#343 - do not treat directories like regular files in existence checks

Aug 5, 2025

@firewave

The helper functions need to be adjusted so they align with the current usage in Cppcheck.

This was referenced

Sep 10, 2025

@firewave firewave changed the title fixed #342/#343 - do not treat directories like regular files in existence checks fixed #342/fixed #343 - do not treat directories like regular files in existence checks

Oct 1, 2025

This was linked to issues

Jun 2, 2026

1 participant

@firewave