xaizek / self-inc-first (License: GPLv2+) (since 2018-12-07)
Clang-based standalone tool that checks for first included file being self include.
Commit b49e7b4d07a78b2674db81d074bcd0c4d37283fd

Transform header path same way as path of source
Author: xaizek
Author date (UTC): 2014-04-09 20:43
Committer name: xaizek
Committer date (UTC): 2014-04-09 20:43
Parent(s): 01f26959025b88a85aac76094812c29337ac793e
Signing key:
Tree: 1f642fe423af4140bffd41bd035e29e9b63bf8d2
File Lines added Lines deleted
src/IncludeFinderAction.cpp 3 2
File src/IncludeFinderAction.cpp changed (mode: 100644) (index 9162045..7c02124)
... ... IncludeFinder::diagnoseAndReport()
159 159
160 160 typedef Includes::iterator It; typedef Includes::iterator It;
161 161 for (It it = includes.begin(); it != includes.end(); ++it) { for (It it = includes.begin(); it != includes.end(); ++it) {
162 const std::string &hdrName = it->second;
162 const std::string &hdrPath = it->second;
163 const std::string &hdrName = path_utils::extractTail(hdrPath);
163 164
164 165 const std::pair<std::string, std::string> nameParts = const std::pair<std::string, std::string> nameParts =
165 166 path_utils::crackName(hdrName); path_utils::crackName(hdrName);
 
... ... IncludeFinder::diagnoseAndReport()
175 176 std::cout << name std::cout << name
176 177 << ':' << ':'
177 178 << "ambiguous header name detection: " << "ambiguous header name detection: "
178 << hdrName
179 << hdrPath
179 180 << std::endl; << std::endl;
180 181 } }
181 182 } else { } else {
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/self-inc-first

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/self-inc-first

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master