Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update files to end with only one newline and update pre-commit config to include "end-of-file-fixer" & "mixed-line-ending" #1185

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ repos:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
exclude: "\\.(svg|vtk|vtp)$"
1 change: 0 additions & 1 deletion Applications/Testing/Cpp/ctkDICOMApplicationTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,3 @@ int main(int argc, char * argv []) {

return EXIT_SUCCESS;
}

Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ const QString ctkCmdLineModuleExplorerConstants::KEY_SEARCH_PATHS = "ModuleSearc
const QString ctkCmdLineModuleExplorerConstants::KEY_REGISTERED_MODULES = "RegisteredModules";

const QString ctkCmdLineModuleExplorerConstants::KEY_MAX_PARALLEL_MODULES = "MaxParallelModules";
const QString ctkCmdLineModuleExplorerConstants::KEY_XML_TIMEOUT_SECONDS = "XmlTimeoutSeconds";
const QString ctkCmdLineModuleExplorerConstants::KEY_XML_TIMEOUT_SECONDS = "XmlTimeoutSeconds";
2 changes: 1 addition & 1 deletion Applications/ctkDICOM/target_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

set(target_libraries
CTKDICOMWidgets
)
)
2 changes: 1 addition & 1 deletion Applications/ctkDICOM2/target_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

set(target_libraries
CTKDICOMWidgets
)
)
2 changes: 1 addition & 1 deletion Applications/ctkDICOMHost/ctkDICOMHostMainLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,4 @@ void ctkDICOMHostMainLogic::onDataAvailable()
filename=filename.remove(0,8);
qDebug()<<filename;
}
}
}
2 changes: 1 addition & 1 deletion Applications/ctkDICOMHost/target_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
SET(target_libraries
org_commontk_dah_examplehost
CTKDICOMWidgets
)
)
2 changes: 1 addition & 1 deletion Applications/ctkDICOMQueryRetrieve/target_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

set(target_libraries
CTKDICOMWidgets
)
)
1 change: 0 additions & 1 deletion Applications/ctkSimplePythonShell/Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ ctkMacroCompilePythonScript(
DESTINATION_DIR ${CTK_BINARY_DIR}/bin/Python
INSTALL_DIR ${CTK_INSTALL_BIN_DIR}
)

Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ foreach(script ${SCRIPTS})
)
set_property(TEST ctkSimplePythonShell_${scriptname} PROPERTY LABELS ${KIT})
endforeach()

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,3 @@ def center(self):
t.setInterval(250)
t.connect('timeout()', app(), 'quit()')
t.start()




Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@
qt.QApplication.exit(1)

qt.QApplication.exit(0)

1 change: 0 additions & 1 deletion Applications/ctkSimplePythonShell/ctkSimplePythonManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ class ctkSimplePythonManager : public ctkAbstractPythonManager


#endif

Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ public Q_SLOTS:
};

#endif

Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
#endif

#endif

1 change: 0 additions & 1 deletion CMake/CTKValgrind.supp
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
fun:_ZN25qSlicerApplicationPrivateD0Ev
fun:_ZN22qSlicerCoreApplicationD1Ev
}

1 change: 0 additions & 1 deletion CMake/MANIFEST.MF.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@_manifest_content@

1 change: 0 additions & 1 deletion CMake/ctkCheckoutRepo.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ ExternalProject_Add(${_NAME}
BUILD_COMMAND ""
INSTALL_COMMAND ""
)

1 change: 0 additions & 1 deletion CMake/ctkConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
#define CTK_SOURCE_DIR "@CTK_SOURCE_DIR@"

#endif

1 change: 0 additions & 1 deletion CMake/ctkFunctionCheckCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ function(ctkFunctionCheckCompilerFlags CXX_FLAG_TO_TEST RESULT_VAR)
endif()

endfunction()

1 change: 0 additions & 1 deletion CMake/ctkFunctionGetCompilerVisibilityFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ function(ctkFunctionGetCompilerVisibilityFlags RESULT_VAR)
endif()

endfunction()

2 changes: 0 additions & 2 deletions CMake/ctkMacroBuildLib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,3 @@ ${${MY_EXPORT_CUSTOM_CONTENT_FROM_VARIABLE}}
)

endmacro()


2 changes: 0 additions & 2 deletions CMake/ctkMacroBuildLibWrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,3 @@ macro(ctkMacroBuildLibWrapper)
endif()

endmacro()


1 change: 0 additions & 1 deletion CMake/ctkMacroBuildQtPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,3 @@ macro(ctkMacroBuildQtStylesPlugin)
PLUGIN_DIR styles
${ARGN})
endmacro()

1 change: 0 additions & 1 deletion CMake/ctkMacroCompilePythonScript.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,3 @@ function(ctkFunctionAddCompilePythonScriptTargets target)
_ctk_add_copy_python_files_target(${target} Resource ${ARGN})
_ctk_add_compile_python_directories_target(${target})
endfunction()

1 change: 0 additions & 1 deletion CMake/ctkMacroSimpleTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ macro(SIMPLE_TEST testname)
set_property(TEST ${testname} PROPERTY ENVIRONMENT_MODIFICATION "${CTK_TEST_LAUNCH_BUILD_ENVIRONMENT_MODIFICATION}")

endmacro()

1 change: 0 additions & 1 deletion CMake/ctkMacroSimpleTestWithData.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ macro(SIMPLE_TEST_WITH_DATA testname baseline_relative_location)

set_property(TEST ${testname} PROPERTY ENVIRONMENT_MODIFICATION "${CTK_TEST_LAUNCH_BUILD_ENVIRONMENT_MODIFICATION}")
endmacro()

1 change: 0 additions & 1 deletion CMake/ctkMacroWrapPythonQt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,3 @@ macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHONQT_INCLUDE_DIR})

endmacro()

1 change: 0 additions & 1 deletion CMake/plugin_manifest.qrc.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@_manifest_qrc_content@

1 change: 0 additions & 1 deletion CMake/plugin_resources_cached.qrc.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@_qrc_content@

1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1244,4 +1244,3 @@ endforeach()
# the end of the whole configuration process, as a "last step".
# This directory is typically the last SUBDIRS in the main CMakeLists.txt.
add_subdirectory(CMake/LastConfigureStep)

1 change: 0 additions & 1 deletion Documentation/CMakeDoxygenFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,4 +494,3 @@ int main(int argc, char** argv)

return EXIT_SUCCESS;
}

2 changes: 1 addition & 1 deletion Documentation/generate_doc.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ if(CREATE_HTML_TARZ_ARCHIVE)
message(STATUS "warning: could not create '${RESULTING_HTML_TARZ_ARCHIVE_FILE}'")
endif()
endif()
endif()
endif()
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
# Copy XML schema file to the Doxygen output directory
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/../Resources/ctkCmdLineModuleProcess.xsd
${CTK_BINARY_DIR}/Documentation/html/ctkCmdLineModuleProcess.xsd)

1 change: 0 additions & 1 deletion Libs/CommandLineModules/Core/Documentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
# Copy XML schema file to the Doxygen output directory
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/../Resources/ctkCmdLineModule.xsd
${CTK_BINARY_DIR}/Documentation/html/ctkCmdLineModule.xsd)

Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,3 @@ int ctkCmdLineModuleDefaultPathBuilderTest(int argc, char* argv[])

return EXIT_SUCCESS;
}

Original file line number Diff line number Diff line change
Expand Up @@ -479,5 +479,3 @@ void ctkCmdLineModuleDirectoryWatcherPrivate::onDirectoryChanged(const QString &
if (this->Debug) qDebug() << "ctkCmdLineModuleDirectoryWatcherPrivate::onDirectoryChanged(" << path << "): failed to load modules, as path invalid.";
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,3 @@ public Q_SLOTS:
};

#endif

Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ This is a list of types provided by the CTK Command Line Module Qt WebKit Fronte
\ref CommandLineModulesFrontendQtWebKit_Page library page for general information.

*/

1 change: 0 additions & 1 deletion Libs/CommandLineModules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,3 @@ Last, we run the front-end instance, using the default values for the module par

After the ctkCmdLineModuleManager::run() method returns, we wait for the running module to finish and print out
some data reported by it.

Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@
</connection>
</xsl:if>
</xsl:template>

Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,3 @@ Blur a 2d image.
</parameters>

</executable>

Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,3 @@ Configurable behaviour for testing purposes.
</parameters>

</executable>

Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,3 @@
</parameters>

</executable>

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkAbstractFactoryTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,3 @@ int ctkAbstractFactoryTest1(int argc, char * argv [] )

return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkAbstractLibraryFactoryTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ int ctkAbstractLibraryFactoryTest1(int argc, char * argv [])
libraryFactory.uninstantiate(itemKey);
return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkAbstractObjectFactoryTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ int ctkAbstractObjectFactoryTest1(int argc, char * argv [] )

return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkAbstractPluginFactoryTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,3 @@ int ctkAbstractPluginFactoryTest1(int argc, char * argv [])
}
return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkAbstractQObjectFactoryTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ int ctkAbstractQObjectFactoryTest1(int argc, char * argv [] )

return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkBinaryFileDescriptorTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,3 @@ int ctkBinaryFileDescriptorTest1(int argc, char * argv[])

return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkCoreTestingMacrosTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,4 +384,3 @@ int TestCheckQVariantFailure()
CHECK_QVARIANT(actual, expected);
return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkCoreTestingUtilitiesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,3 @@ bool TestCheckVariant()
}
return true;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkDummyPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ class CTK_DUMMY_EXPORT ctkDummyPlugin: public QObject//, public ctkDummyInterfac

virtual void dummyInterface();
};

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkExampleDerivedWorkflowStep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,3 @@ void ctkExampleDerivedWorkflowStep::onExit(
//-----------------------------------------------------------------------------
CTK_GET_CPP(ctkExampleDerivedWorkflowStep, int, numberOfTimesRanOnEntry, numberOfTimesRanOnEntry);
CTK_GET_CPP(ctkExampleDerivedWorkflowStep, int, numberOfTimesRanOnExit, numberOfTimesRanOnExit);

Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,3 @@ void ctkExampleWorkflowStepUsingSignalsAndSlots::onExit(const ctkWorkflowStep* g
//-----------------------------------------------------------------------------
CTK_GET_CPP(ctkExampleWorkflowStepUsingSignalsAndSlots, int, numberOfTimesRanOnEntry, numberOfTimesRanOnEntry);
CTK_GET_CPP(ctkExampleWorkflowStepUsingSignalsAndSlots, int, numberOfTimesRanOnExit, numberOfTimesRanOnExit);

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkModelTesterTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,3 @@ int ctkModelTesterTest1(int argc, char * argv [] )

return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkModelTesterTest2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,3 @@ int ctkModelTesterTest2(int argc, char * argv [] )

return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkPimplTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ int ctkPimplTest1(int argc, char * argv [] )

return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkSingletonTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ int ctkSingletonTest1(int argc, char * argv [] )
}
return EXIT_SUCCESS;
}

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkSingletonTestHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@ int ctkSingletonTestHelper::northFaceCount()const

//-----------------------------------------------------------------------------
CTK_SINGLETON_DEFINE(ctkSingletonTestHelper)

1 change: 0 additions & 1 deletion Libs/Core/Testing/Cpp/ctkUtilsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,4 +405,3 @@ void ctkUtilsTester::testTakeFirst_data()
// ----------------------------------------------------------------------------
CTK_TEST_MAIN(ctkUtilsTest)
#include "moc_ctkUtilsTest.cpp"

1 change: 0 additions & 1 deletion Libs/Core/ctkBooleanMapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,3 @@ protected Q_SLOTS:
};

#endif

2 changes: 0 additions & 2 deletions Libs/Core/ctkCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,3 @@ void ctkCallback::invoke()
}
(*this->Callback)(this->CallbackData);
}


1 change: 0 additions & 1 deletion Libs/Core/ctkCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,3 @@ public Q_SLOTS:
};

#endif

1 change: 0 additions & 1 deletion Libs/Core/ctkCommandLineParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,3 @@ void ctkCommandLineParser::setStrictModeEnabled(bool strictMode)
{
this->Internal->StrictMode = strictMode;
}

1 change: 0 additions & 1 deletion Libs/Core/ctkCoreTestingMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,3 @@
}

#endif

1 change: 0 additions & 1 deletion Libs/Core/ctkCoreTestingUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,3 @@ bool CheckVariant(int line, const QString& description,
}

} // namespace ctkCoreTestingUtilities

1 change: 0 additions & 1 deletion Libs/Core/ctkCoreTestingUtilities.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,3 @@ bool CheckList(int line, const QString& description,
}

} // namespace ctkCoreTestingUtilities

1 change: 0 additions & 1 deletion Libs/Core/ctkDependencyGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,3 @@ class CTK_CORE_EXPORT ctkDependencyGraph
};

#endif

1 change: 0 additions & 1 deletion Libs/Core/ctkErrorLogFDMessageHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ class CTK_CORE_EXPORT ctkErrorLogFDMessageHandler : public ctkErrorLogAbstractMe
};

#endif

1 change: 0 additions & 1 deletion Libs/Core/ctkErrorLogQtMessageHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ class CTK_CORE_EXPORT ctkErrorLogQtMessageHandler : public ctkErrorLogAbstractMe
};

#endif

1 change: 0 additions & 1 deletion Libs/Core/ctkErrorLogStreamMessageHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ class CTK_CORE_EXPORT ctkErrorLogStreamMessageHandler
};

#endif

1 change: 0 additions & 1 deletion Libs/Core/ctkFileLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,3 @@ void ctkFileLogger::logMessage(const QString& msg)
s << msg << ctk::endl;
f.close();
}

1 change: 0 additions & 1 deletion Libs/Core/ctkLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,3 @@ ctkErrorLogLevel::LogLevel ctkLogger::logLevel() const
Q_D(const ctkLogger);
return d->LogLevel;
}

1 change: 0 additions & 1 deletion Libs/Core/ctkModelTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,4 +609,3 @@ void ctkModelTester::onItemsRemoved(const QModelIndex & vparent, Qt::Orientation

this->testModel();
}

Loading