From 186d01fbb45e599974ad926243c564f6d9f0238f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 19 Aug 2025 22:25:29 +0200 Subject: [PATCH 1/3] Premium: Update --help output and manual for --premium-license-file and --premium-cert-c-int-precision options --- cli/cmdlineparser.cpp | 7 +++++-- man/manual-premium.md | 11 +++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 7010e5c3f5e..89ea0c0bcba 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -1895,10 +1895,13 @@ void CmdLineParser::printHelp() const " To check all files, append \":all\" i.e. --premium=misra-c++-2023:all.\n" " Other:\n" " * bughunting Soundy analysis\n" - " * cert-c-int-precision=BITS Integer precision to use in Cert C analysis.\n" " * metrics Calculate metrics. Metrics are only reported in xmlv3 output.\n" " * safety Turn on safety certified behavior (ON by default)\n" - " * safety-off Turn off safety certified behavior\n"; + " * safety-off Turn off safety certified behavior\n" + " --premium-cert-c-int-precision=BITS\n" + " Integer precision to use in Cert C analysis.\n" + " --premium-license-file=\n" + " Provide license file path with argument.\n"; } oss << diff --git a/man/manual-premium.md b/man/manual-premium.md index bf89cb3d67c..6d9bf389408 100644 --- a/man/manual-premium.md +++ b/man/manual-premium.md @@ -1342,6 +1342,17 @@ https://www.cppcheck.com/plans-pricing This is described on the Cppcheck Premium website: https://www.cppcheck.com +### License file path + +There are predefined paths where the premium addon search for license files. If you want to +provide an arbitrary license file path on the command line you can use the option +`--premium-license-file`. Example: + + cppcheck --premium-license-file=path/to/file.lic test.cpp + +If an explicit path is provided like this then premium addon does not search for license +files in the predefined paths. + ### Troubleshooting If your license does not work you can get some details about the license validation by executing From acf130bfb63c1c84b6aea4a82b10cf3870403c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 21 Aug 2025 10:56:20 +0200 Subject: [PATCH 2/3] BITS --- cli/cmdlineparser.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 89ea0c0bcba..90bd4c6524f 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -1899,7 +1899,12 @@ void CmdLineParser::printHelp() const " * safety Turn on safety certified behavior (ON by default)\n" " * safety-off Turn off safety certified behavior\n" " --premium-cert-c-int-precision=BITS\n" - " Integer precision to use in Cert C analysis.\n" + " Integer precision to use in Cert C analysis. The precision of 'int' and the size of\n" + " 'int' is usually the same, and then you shall not use this option.\n" + " If the precision of 'int' is less than the size of 'int' then use this option to\n" + " specify the precision. BITS shall be a positive value that is less than the size of\n" + " 'int'. I.e. if size of 'int' is 32 bits then BITS shall be a positive value that is\n" + " less than 32.\n" " --premium-license-file=\n" " Provide license file path with argument.\n"; } From 6a2de1fd9934cc57b10d377bd500d30f94796c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 21 Aug 2025 12:42:21 +0200 Subject: [PATCH 3/3] rewrite --- cli/cmdlineparser.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 90bd4c6524f..02683ba2e7d 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -1899,12 +1899,9 @@ void CmdLineParser::printHelp() const " * safety Turn on safety certified behavior (ON by default)\n" " * safety-off Turn off safety certified behavior\n" " --premium-cert-c-int-precision=BITS\n" - " Integer precision to use in Cert C analysis. The precision of 'int' and the size of\n" - " 'int' is usually the same, and then you shall not use this option.\n" - " If the precision of 'int' is less than the size of 'int' then use this option to\n" - " specify the precision. BITS shall be a positive value that is less than the size of\n" - " 'int'. I.e. if size of 'int' is 32 bits then BITS shall be a positive value that is\n" - " less than 32.\n" + " Integer precision to use in Cert C analysis. Only needed if precision of 'int' is\n" + " less than the size of 'int'. BITS shall be a positive value that is less than the\n" + " size of 'int'. This precision is used for INT35-C checking.\n" " --premium-license-file=\n" " Provide license file path with argument.\n"; }