Title: `#include` pointing to directory is treated as existing empty file · Issue #343 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: `#include` pointing to directory is treated as existing empty file · Issue #343 · cppcheck-opensource/simplecpp
X Title: `#include` pointing to directory is treated as existing empty file · Issue #343 · cppcheck-opensource/simplecpp
Description: If an include points to an existing directory (e.g. #include >) the code will not raise an error. I would expect it to report EXPLICIT_INCLUDE_NOT_FOUND. This is caused by using std::ifstream::is_open() to determine the existence of a ...
Open Graph Description: If an include points to an existing directory (e.g. #include >) the code will not raise an error. I would expect it to report EXPLICIT_INCLUDE_NOT_FOUND. This is caused by using std::ifstream::is...
X Description: If an include points to an existing directory (e.g. #include </>) the code will not raise an error. I would expect it to report EXPLICIT_INCLUDE_NOT_FOUND. This is caused by using std::ifstre...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/343
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`#include` pointing to directory is treated as existing empty file","articleBody":"If an include points to an existing directory (e.g. `#include \u003c/\u003e`) the code will not raise an error. I would expect it to report `EXPLICIT_INCLUDE_NOT_FOUND`.\r\n\r\nThis is caused by using `std::ifstream::is_open()` to determine the existence of a file. But if you do this on a directory it will be successful as well as the subsequent read. It will not read anything though so it behaves like an empty file.","author":{"url":"https://github.com/firewave","@type":"Person","name":"firewave"},"datePublished":"2024-02-22T18:32:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/343/simplecpp/issues/343"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0f6c2861-828c-1189-d74e-2c28357a6fa7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE28:2AD843:FA2480:154D59D:6A4F0926 |
| html-safe-nonce | 7731a97181abc028e43e188fab03421576e994dd53e5bc2e296cff34bdf363bd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTI4OjJBRDg0MzpGQTI0ODA6MTU0RDU5RDo2QTRGMDkyNiIsInZpc2l0b3JfaWQiOiI4NDUxNTAxMDI3ODM3MjM4MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2324c15c0867f00785bc9e0cb8275aa59db1b74fb85b4208b31d1edc634820de |
| hovercard-subject-tag | issue:2149700074 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cppcheck-opensource/simplecpp/343/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ba242a31a1564d378627febcfe6a926b07eb361cf2d300b5485f15a3e17a84a5/cppcheck-opensource/simplecpp/issues/343 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ba242a31a1564d378627febcfe6a926b07eb361cf2d300b5485f15a3e17a84a5/cppcheck-opensource/simplecpp/issues/343 |
| og:image:alt | If an include points to an existing directory (e.g. #include >) the code will not raise an error. I would expect it to report EXPLICIT_INCLUDE_NOT_FOUND. This is caused by using std::ifstream::is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | firewave |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/cppcheck-opensource/simplecpp git https://github.com/cppcheck-opensource/simplecpp.git |
| octolytics-dimension-user_id | 278097703 |
| octolytics-dimension-user_login | cppcheck-opensource |
| octolytics-dimension-repository_id | 33434464 |
| octolytics-dimension-repository_nwo | cppcheck-opensource/simplecpp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33434464 |
| octolytics-dimension-repository_network_root_nwo | cppcheck-opensource/simplecpp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width