From 15a905b3678971a9a3262ff59b520cc4cb9a7338 Mon Sep 17 00:00:00 2001 From: Tingan Ho Date: Sat, 7 Jan 2017 12:10:48 +0100 Subject: [PATCH] Fixes new folder structure --- .editorconfig | 4 ++- .gitignore | 15 +++++------ .gitmodules | 4 +-- .travis.yml | 2 +- CMakeLists.txt | 26 +++++++++---------- Tests/Cases/Projects/DefaultHelp/Command.cmd | 2 +- .../Projects/UnknownCommandFlag/Command.cmd | 2 +- .../Extensions/JavaScript/Extension.json | 0 .../Extensions/JavaScript/dep-test | 0 {Source => src}/Program/CommandController.cpp | 0 {Source => src}/Program/CommandParser.cpp | 0 {Source => src}/Program/Configurations.h.in | 0 {Source => src}/Program/Core.cpp | 0 {Source => src}/Program/Diagnostics.cpp | 0 {Source => src}/Program/Diagnostics.json | 0 {Source => src}/Program/Exec.cpp | 0 {Source => src}/Program/Types.cpp | 0 {Source => src}/Program/Utils.cpp | 0 {Source => src}/TestFramework/Core.cpp | 0 {Source => src}/TestFramework/Exec.cpp | 0 .../TestFramework/ProjectTestRunner.cpp | 0 {Source => src}/Vendors/Glob/CMakeLists.txt | 0 {Source => src}/Vendors/Glob/LICENSE | 0 {Source => src}/Vendors/Glob/find.cpp | 0 {Source => src}/Vendors/Glob/glob.h | 0 {Source => src}/Vendors/Glob/glob_posix.cpp | 0 {Source => src}/Vendors/Glob/glob_posix.h | 0 {Source => src}/Vendors/Glob/glob_win32.cpp | 0 {Source => src}/Vendors/Glob/glob_win32.h | 0 {Source => src}/Vendors/json | 0 .../Cases/Projects/UnknownAction/Command.cmd | 1 + 31 files changed, 29 insertions(+), 27 deletions(-) rename {Source => src}/Extensions/JavaScript/Extension.json (100%) rename {Source => src}/Extensions/JavaScript/dep-test (100%) rename {Source => src}/Program/CommandController.cpp (100%) rename {Source => src}/Program/CommandParser.cpp (100%) rename {Source => src}/Program/Configurations.h.in (100%) rename {Source => src}/Program/Core.cpp (100%) rename {Source => src}/Program/Diagnostics.cpp (100%) rename {Source => src}/Program/Diagnostics.json (100%) rename {Source => src}/Program/Exec.cpp (100%) rename {Source => src}/Program/Types.cpp (100%) rename {Source => src}/Program/Utils.cpp (100%) rename {Source => src}/TestFramework/Core.cpp (100%) rename {Source => src}/TestFramework/Exec.cpp (100%) rename {Source => src}/TestFramework/ProjectTestRunner.cpp (100%) rename {Source => src}/Vendors/Glob/CMakeLists.txt (100%) rename {Source => src}/Vendors/Glob/LICENSE (100%) rename {Source => src}/Vendors/Glob/find.cpp (100%) rename {Source => src}/Vendors/Glob/glob.h (100%) rename {Source => src}/Vendors/Glob/glob_posix.cpp (100%) rename {Source => src}/Vendors/Glob/glob_posix.h (100%) rename {Source => src}/Vendors/Glob/glob_win32.cpp (100%) rename {Source => src}/Vendors/Glob/glob_win32.h (100%) rename {Source => src}/Vendors/json (100%) create mode 100644 tests/Cases/Projects/UnknownAction/Command.cmd diff --git a/.editorconfig b/.editorconfig index 98a393e6..921c7bdb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,18 +3,20 @@ root = true [*] charset = utf-8 -end_of_line = lf trim_trailing_whitespace = true [*.{cpp,h,in}] indent_style = space indent_size = 4 +end_of_line = lf insert_final_newline = true [*.yml] indent_style = space indent_size = 2 +end_of_line = lf [*.json] indent_style = space indent_size = 4 +end_of_line = lf diff --git a/.gitignore b/.gitignore index 2e2fd8c3..e3b30169 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,9 @@ .idea .vscode -Build/ -Debug/ -Production/ -Executables/ -Source/Program/Configurations.h -Source/Vendors/*/Makefile -Source/Vendors/Glob/libglob.a -Tests/Current/ +debug/ +production/ +bin/ +src/Program/Configurations.h +src/Vendors/*/Makefile +src/Vendors/Glob/libglob.a +tests/Current/ diff --git a/.gitmodules b/.gitmodules index 949580c7..24358530 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "Source/Vendors/json"] - path = Source/Vendors/json +[submodule "src/Vendors/json"] + path = src/Vendors/json url = git@github.com:nlohmann/json.git diff --git a/.travis.yml b/.travis.yml index cb513f17..c86ccdf5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ language: cpp script: - mkdir Build && cd Build - cmake -DCMAKE_CXX_COMPILER=$COMPILER .. && make - - cd .. && ./Executables/run-tests + - cd .. && ./bin/run-tests # Handle git submodules by ourselves. git: diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a323ba3..56708386 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,26 +5,26 @@ project(l10ns) set(VERSION "3.0") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/Executables) +set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) -configure_file(${PROJECT_SOURCE_DIR}/Source/Program/Configurations.h.in ${PROJECT_SOURCE_DIR}/Source/Program/Configurations.h) +configure_file(${PROJECT_SOURCE_DIR}/src/Program/Configurations.h.in ${PROJECT_SOURCE_DIR}/src/Program/Configurations.h) find_package(Boost 1.62 COMPONENTS system filesystem regex REQUIRED) -add_subdirectory(Source/Vendors/Glob) -add_subdirectory(Source/Vendors/json) +add_subdirectory(src/Vendors/Glob) +add_subdirectory(src/Vendors/json) -include_directories("${PROJECT_SOURCE_DIR}/Source/Program") -include_directories("${PROJECT_SOURCE_DIR}/Source/Vendors/Glob") -include_directories("${PROJECT_SOURCE_DIR}/Source/Vendors/json/src") +include_directories("${PROJECT_SOURCE_DIR}/src/Program") +include_directories("${PROJECT_SOURCE_DIR}/src/Vendors/Glob") +include_directories("${PROJECT_SOURCE_DIR}/src/Vendors/json/src") -add_executable(l10ns ${PROJECT_SOURCE_DIR}/Source/Program/Exec.cpp) +add_executable(l10ns ${PROJECT_SOURCE_DIR}/src/Program/Exec.cpp) -add_executable(accept-baseline ${PROJECT_SOURCE_DIR}/Tasks/AcceptBaseline.cpp) -add_executable(clean-project ${PROJECT_SOURCE_DIR}/Tasks/Clean.cpp) -add_executable(diff ${PROJECT_SOURCE_DIR}/Tasks/Diff.cpp) -add_executable(generate-diagnostics ${PROJECT_SOURCE_DIR}/Tasks/GenerateDiagnostics.cpp) -add_executable(run-tests ${PROJECT_SOURCE_DIR}/Source/TestFramework/Exec.cpp) +add_executable(accept-baseline ${PROJECT_SOURCE_DIR}/tasks/AcceptBaseline.cpp) +add_executable(clean-project ${PROJECT_SOURCE_DIR}/tasks/Clean.cpp) +add_executable(diff ${PROJECT_SOURCE_DIR}/tasks/Diff.cpp) +add_executable(generate-diagnostics ${PROJECT_SOURCE_DIR}/tasks/GenerateDiagnostics.cpp) +add_executable(run-tests ${PROJECT_SOURCE_DIR}/src/TestFramework/Exec.cpp) target_link_libraries(l10ns glob ${Boost_LIBRARIES}) diff --git a/Tests/Cases/Projects/DefaultHelp/Command.cmd b/Tests/Cases/Projects/DefaultHelp/Command.cmd index 2255a80a..eeafe3ff 100644 --- a/Tests/Cases/Projects/DefaultHelp/Command.cmd +++ b/Tests/Cases/Projects/DefaultHelp/Command.cmd @@ -1 +1 @@ ---help +--help \ No newline at end of file diff --git a/Tests/Cases/Projects/UnknownCommandFlag/Command.cmd b/Tests/Cases/Projects/UnknownCommandFlag/Command.cmd index aea53485..0f07893d 100644 --- a/Tests/Cases/Projects/UnknownCommandFlag/Command.cmd +++ b/Tests/Cases/Projects/UnknownCommandFlag/Command.cmd @@ -1 +1 @@ ---unknown +--unknown \ No newline at end of file diff --git a/Source/Extensions/JavaScript/Extension.json b/src/Extensions/JavaScript/Extension.json similarity index 100% rename from Source/Extensions/JavaScript/Extension.json rename to src/Extensions/JavaScript/Extension.json diff --git a/Source/Extensions/JavaScript/dep-test b/src/Extensions/JavaScript/dep-test similarity index 100% rename from Source/Extensions/JavaScript/dep-test rename to src/Extensions/JavaScript/dep-test diff --git a/Source/Program/CommandController.cpp b/src/Program/CommandController.cpp similarity index 100% rename from Source/Program/CommandController.cpp rename to src/Program/CommandController.cpp diff --git a/Source/Program/CommandParser.cpp b/src/Program/CommandParser.cpp similarity index 100% rename from Source/Program/CommandParser.cpp rename to src/Program/CommandParser.cpp diff --git a/Source/Program/Configurations.h.in b/src/Program/Configurations.h.in similarity index 100% rename from Source/Program/Configurations.h.in rename to src/Program/Configurations.h.in diff --git a/Source/Program/Core.cpp b/src/Program/Core.cpp similarity index 100% rename from Source/Program/Core.cpp rename to src/Program/Core.cpp diff --git a/Source/Program/Diagnostics.cpp b/src/Program/Diagnostics.cpp similarity index 100% rename from Source/Program/Diagnostics.cpp rename to src/Program/Diagnostics.cpp diff --git a/Source/Program/Diagnostics.json b/src/Program/Diagnostics.json similarity index 100% rename from Source/Program/Diagnostics.json rename to src/Program/Diagnostics.json diff --git a/Source/Program/Exec.cpp b/src/Program/Exec.cpp similarity index 100% rename from Source/Program/Exec.cpp rename to src/Program/Exec.cpp diff --git a/Source/Program/Types.cpp b/src/Program/Types.cpp similarity index 100% rename from Source/Program/Types.cpp rename to src/Program/Types.cpp diff --git a/Source/Program/Utils.cpp b/src/Program/Utils.cpp similarity index 100% rename from Source/Program/Utils.cpp rename to src/Program/Utils.cpp diff --git a/Source/TestFramework/Core.cpp b/src/TestFramework/Core.cpp similarity index 100% rename from Source/TestFramework/Core.cpp rename to src/TestFramework/Core.cpp diff --git a/Source/TestFramework/Exec.cpp b/src/TestFramework/Exec.cpp similarity index 100% rename from Source/TestFramework/Exec.cpp rename to src/TestFramework/Exec.cpp diff --git a/Source/TestFramework/ProjectTestRunner.cpp b/src/TestFramework/ProjectTestRunner.cpp similarity index 100% rename from Source/TestFramework/ProjectTestRunner.cpp rename to src/TestFramework/ProjectTestRunner.cpp diff --git a/Source/Vendors/Glob/CMakeLists.txt b/src/Vendors/Glob/CMakeLists.txt similarity index 100% rename from Source/Vendors/Glob/CMakeLists.txt rename to src/Vendors/Glob/CMakeLists.txt diff --git a/Source/Vendors/Glob/LICENSE b/src/Vendors/Glob/LICENSE similarity index 100% rename from Source/Vendors/Glob/LICENSE rename to src/Vendors/Glob/LICENSE diff --git a/Source/Vendors/Glob/find.cpp b/src/Vendors/Glob/find.cpp similarity index 100% rename from Source/Vendors/Glob/find.cpp rename to src/Vendors/Glob/find.cpp diff --git a/Source/Vendors/Glob/glob.h b/src/Vendors/Glob/glob.h similarity index 100% rename from Source/Vendors/Glob/glob.h rename to src/Vendors/Glob/glob.h diff --git a/Source/Vendors/Glob/glob_posix.cpp b/src/Vendors/Glob/glob_posix.cpp similarity index 100% rename from Source/Vendors/Glob/glob_posix.cpp rename to src/Vendors/Glob/glob_posix.cpp diff --git a/Source/Vendors/Glob/glob_posix.h b/src/Vendors/Glob/glob_posix.h similarity index 100% rename from Source/Vendors/Glob/glob_posix.h rename to src/Vendors/Glob/glob_posix.h diff --git a/Source/Vendors/Glob/glob_win32.cpp b/src/Vendors/Glob/glob_win32.cpp similarity index 100% rename from Source/Vendors/Glob/glob_win32.cpp rename to src/Vendors/Glob/glob_win32.cpp diff --git a/Source/Vendors/Glob/glob_win32.h b/src/Vendors/Glob/glob_win32.h similarity index 100% rename from Source/Vendors/Glob/glob_win32.h rename to src/Vendors/Glob/glob_win32.h diff --git a/Source/Vendors/json b/src/Vendors/json similarity index 100% rename from Source/Vendors/json rename to src/Vendors/json diff --git a/tests/Cases/Projects/UnknownAction/Command.cmd b/tests/Cases/Projects/UnknownAction/Command.cmd new file mode 100644 index 00000000..87edf799 --- /dev/null +++ b/tests/Cases/Projects/UnknownAction/Command.cmd @@ -0,0 +1 @@ +unknown \ No newline at end of file