diff --git a/cmake/sca/eclair/sca.cmake b/cmake/sca/eclair/sca.cmake index 9eb828c67b4..8dbc8a42f97 100644 --- a/cmake/sca/eclair/sca.cmake +++ b/cmake/sca/eclair/sca.cmake @@ -8,6 +8,16 @@ message(STATUS "Found eclair_env: ${ECLAIR_ENV}") find_program(ECLAIR_REPORT eclair_report REQUIRED) message(STATUS "Found eclair_report: ${ECLAIR_REPORT}") +if(ECLAIR_OPTIONS_FILE) + if(IS_ABSOLUTE ${ECLAIR_OPTIONS_FILE}) + set(ECLAIR_OPTIONS ${ECLAIR_OPTIONS_FILE}) + else() + set(ECLAIR_OPTIONS ${APPLICATION_CONFIG_DIR}/${ECLAIR_OPTIONS_FILE}) + endif() + include(${ECLAIR_OPTIONS}) +else() + include(${CMAKE_CURRENT_LIST_DIR}/sca_options.cmake) +endif() # ECLAIR Settings set(ECLAIR_PROJECT_NAME "Zephyr-${BOARD}${BOARD_QUALIFIERS}") diff --git a/cmake/sca/eclair/sca_options.cmake b/cmake/sca/eclair/sca_options.cmake new file mode 100644 index 00000000000..2402b0e8446 --- /dev/null +++ b/cmake/sca/eclair/sca_options.cmake @@ -0,0 +1,34 @@ +include(CMakeDependentOption) + +option(ECLAIR_RULESET_FIRST_ANALYSIS "A tiny selection of the projects coding guideline rules to + verify that everything is correctly working" ON) + +option(ECLAIR_RULESET_STU "Selection of the projects coding guidelines, which can be verified + by analysing the single translation units independently." OFF) + +option(ECLAIR_RULESET_STU_HEAVY "Selection of complex STU project coding guidelines that + require a significant amount of time" OFF) +option(ECLAIR_RULESET_WP "All whole program project coding guidelines ('system' in MISRA's + parlance)." OFF) +option(ECLAIR_RULESET_STD_LIB "Project coding guidelines about the C Standard Library" OFF) +option(ECLAIR_RULESET_USER "User defined ruleset" OFF) + +option(ECLAIR_METRICS_TAB "Metrics in a spreadsheet format" OFF) +option(ECLAIR_REPORTS_TAB "Findings in a spreadsheet format" OFF) +option(ECLAIR_REPORTS_SARIF "Findings in sarif JSON format" ON) +option(ECLAIR_SUMMARY_TXT "Plain textual summary format" OFF) +option(ECLAIR_SUMMARY_DOC "DOC summary format" OFF) +option(ECLAIR_SUMMARY_ODT "ODT summary format" OFF) +option(ECLAIR_FULL_TXT "Detailed plain textual format" ON) +option(ECLAIR_FULL_DOC "Detailed DOC format" OFF) +option(ECLAIR_FULL_ODT "Detailed ODT format" OFF) + +cmake_dependent_option(ECLAIR_FULL_DOC_ALL_AREAS "Show all areas in a full doc report" + OFF "ECLAIR_FULL_DOC OR ECLAIR_FULL_ODT" OFF) +cmake_dependent_option(ECLAIR_FULL_DOC_FIRST_AREA "Show only the first area in a full doc report" + ON "ECLAIR_FULL_DOC OR ECLAIR_FULL_ODT" OFF) + +cmake_dependent_option(ECLAIR_FULL_TXT_ALL_AREAS "Show all areas in a full text report" + OFF "ECLAIR_FULL_TXT" OFF) +cmake_dependent_option(ECLAIR_FULL_TXT_FIRST_AREA "Show only the first area in a full text report" + ON "ECLAIR_FULL_TXT" OFF)