LINT fix & check all files with clang-format
authorLoic Blot <loic.blot@unix-experience.fr>
Mon, 22 May 2017 05:28:35 +0000 (07:28 +0200)
committerLoic Blot <loic.blot@unix-experience.fr>
Mon, 22 May 2017 05:28:35 +0000 (07:28 +0200)
Seems the diff mode doesn't work well, PR are detected as working whereas in master it's shown it's problematic (and really problematic). Use same check everywhere

src/script/lua_api/l_client.cpp
util/travis/lint.sh

index 0b7450af291d17e949e804e7d46272da95f85358..3c2955bcd3dfc5e7ba00b45abbfc8376ab1a0f3e 100644 (file)
@@ -88,7 +88,7 @@ int ModApiClient::l_display_chat_message(lua_State *L)
 // send_chat_message(message)
 int ModApiClient::l_send_chat_message(lua_State *L)
 {
-       if (!lua_isstring(L,1))
+       if (!lua_isstring(L, 1))
                return 0;
        std::string message = luaL_checkstring(L, 1);
        getClient(L)->sendChatMessage(utf8_to_wide(message));
index 4e816bd94e402b76b98e6ee7456846a266937836..cd5f41779a139aa50a073a1e1df0ae25560eb93e 100644 (file)
@@ -9,13 +9,7 @@ function perform_lint() {
        echo "LINT: Using binary $CLANG_FORMAT"
        CLANG_FORMAT_WHITELIST="util/travis/clang-format-whitelist.txt"
 
-       if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
-               # Get list of every file modified in this pull request
-               files_to_lint="$(git diff --name-only --diff-filter=ACMRTUXB $TRAVIS_COMMIT_RANGE | grep '^src/[^.]*[.]\(cpp\|h\)$' | true)"
-       else
-               # Check everything for branch pushes
-               files_to_lint="$(find src/ -name '*.cpp' -or -name '*.h')"
-       fi
+       files_to_lint="$(find src/ -name '*.cpp' -or -name '*.h')"
 
        local errorcount=0
        local fail=0