-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adding in more clang-tidy check and resolving the issues
Added in more clang-tidy for readability and misc checks. Not all are added for how many warnings there are for some checks so handling them one at a time. While fixing the various issues I also implemented safe_strto(u)l(l) functions to have more consistent error checks everywhere we use them to parse strings. Signed-off-by: Tyler Erickson <tyler.erickson@seagate.com>
- Loading branch information
1 parent
c6d9f9a
commit 87b5dc5
Showing
13 changed files
with
172 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,38 @@ | ||
Checks: '-*,modernize-*,cert-*,bugprone-*,-bugprone-easily-swappable-parameters,clang-analyzer-*,-clang-analyzer-deadcode.DeadStores' | ||
#other available checks: clang-analyzer-*, performance-*, readability-*, misc-* | ||
#Disabled checks: | ||
# -bugprone-easily-swappable-parameters - warns a LOT. Sometimes on functions meant to look like standardized C11 annex k functions | ||
# While a overall useful thing to consider, it's too noisy right now and it may make the API | ||
# harder to use to resolve all of these. | ||
# -clang-analyzer-deadcode.DeadStores - A lot of warnings related to this. Will be good to cleanup, but due to how many | ||
# there currently are, it's better to concentrate on other more pressing problems | ||
Checks: | ||
'-*, | ||
modernize-*, | ||
cert-*, | ||
bugprone-*, | ||
-bugprone-easily-swappable-parameters, | ||
clang-analyzer-*, | ||
-clang-analyzer-deadcode.DeadStores, | ||
misc-*, | ||
-misc-no-recursion, | ||
-misc-unused-parameters, | ||
readability-non-const-parameter, | ||
readability-inconsistent-declaration-parameter-name, | ||
readability-redundant-control-flow, | ||
readability-duplicate-include, | ||
readability-avoid-const-params-in-decls, | ||
readability-function-cognitive-complexity' | ||
|
||
# Other available checks: | ||
# clang-analyzer-*, performance-*, readability-*, misc-* | ||
|
||
# Disabled checks: | ||
# - bugprone-easily-swappable-parameters: | ||
# Warns a LOT. Sometimes on functions meant to look like standardized C11 annex k functions. | ||
# While overall useful, it's too noisy right now and may complicate API usability. | ||
# - clang-analyzer-deadcode.DeadStores: | ||
# Generates many warnings. Cleanup is needed, but focus on more pressing issues first. | ||
# - misc-no-recursion: | ||
# Recursion is useful in our code, so this check is not applicable. | ||
# - misc-unused-parameters: | ||
# Too many false positives. | ||
# - readability-*: | ||
# Currently generates too many warnings. Manually adding rules until we can address these issues later. | ||
|
||
WarningsAsErrors: '' | ||
HeaderFilterRegex: '.*' | ||
AnalyzeTemporaryDtors: false | ||
FormatStyle: 'file' | ||
FormatStyle: 'file' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule opensea-common
updated
36 files
Submodule opensea-operations
updated
29 files
+35 −9 | .clang-tidy | |
+34 −34 | include/device_statistics.h | |
+2 −2 | include/drive_info.h | |
+4 −4 | include/farm_log.h | |
+86 −87 | include/logs.h | |
+3 −3 | include/operations.h | |
+2 −2 | include/sanitize.h | |
+3 −3 | include/seagate_operations.h | |
+1 −1 | include/sector_repair.h | |
+0 −1 | src/ata_device_config_overlay.c | |
+0 −1 | src/depopulate.c | |
+0 −1 | src/device_statistics.c | |
+0 −3 | src/drive_info.c | |
+147 −144 | src/dst.c | |
+25 −25 | src/farm_log.c | |
+0 −1 | src/firmware_download.c | |
+0 −2 | src/format.c | |
+121 −121 | src/logs.c | |
+3 −4 | src/operations.c | |
+7 −14 | src/partition_info.c | |
+23 −23 | src/power_control.c | |
+0 −2 | src/reservations.c | |
+36 −36 | src/sanitize.c | |
+1 −6 | src/sata_phy.c | |
+397 −398 | src/seagate_operations.c | |
+4 −4 | src/sector_repair.c | |
+3 −5 | src/smart.c | |
+2 −1 | src/trim_unmap.c | |
+0 −1 | src/zoned_operations.c |
Submodule opensea-transport
updated
33 files
+35 −9 | .clang-tidy | |
+6 −4 | include/ata_helper_func.h | |
+0 −1 | include/cam_helper.h | |
+1 −1 | include/csmi_helper_func.h | |
+3 −1 | include/intel_rst_defs.h | |
+2 −2 | include/sat_helper_func.h | |
+3 −1 | include/scsi_helper.h | |
+25 −25 | include/scsi_helper_func.h | |
+0 −1 | include/sg_helper.h | |
+0 −1 | include/vm_helper.h | |
+15 −13 | src/aix_helper.c | |
+7 −7 | src/ata_cmds.c | |
+3 −4 | src/ata_helper.c | |
+2 −2 | src/ata_legacy_cmds.c | |
+9 −3 | src/cam_helper.c | |
+12 −14 | src/ciss_helper.c | |
+0 −1 | src/cmds.c | |
+20 −14 | src/common_public.c | |
+25 −37 | src/csmi_helper.c | |
+0 −2 | src/intel_rst_helper.c | |
+0 −1 | src/nvme_helper.c | |
+2 −2 | src/of_nvme_helper.c | |
+0 −1 | src/raid_scan_helper.c | |
+18 −19 | src/sat_helper.c | |
+0 −1 | src/sata_helper_func.c | |
+34 −36 | src/scsi_helper.c | |
+85 −93 | src/sg_helper.c | |
+13 −17 | src/sntl_helper.c | |
+33 −75 | src/uefi_helper.c | |
+9 −7 | src/uscsi_helper.c | |
+4 −3 | src/vm_helper.c | |
+1 −2 | src/vm_nvme_lib.c | |
+141 −136 | src/win_helper.c |
Oops, something went wrong.