SPLINT(1)
okay so bestie, meet SPLINT(1) from Release 3.1.2a โ the static C checker manual, but make it make sense ๐
๐ NAME ๐
splint โ a tool for statically checking C programs. Like, it's literally the vibe check for your C code, bestie ๐ฆ
โจ SYNOPSIS โจ
splint [options]
๐ธ DESCRIPTION ๐ธ
SPLINT? No bestie, it's splint โ a tool for statically checking C programs for security vulnerabilities and common programming mistakes. With minimal effort, splint can be used as a better lint(1). If additional effort is invested adding annotations to programs, splint can perform stronger checks than can be done by any standard lint. For full documentation, please see http://www.splint.org. This man page only covers a few of the available options. iykyk ๐
๐ OPTIONS ๐
-helpโ Shows help. So helpful, so iconic. โจ
๐ฑ Initialization ๐ฑ
These flags control directories and files used by splint. They may be used from the command line or in an options file, but may not be used as control comments in the source code. Except where noted, they have the same meaning preceded by - or +. periodt. ๐ซถ
-tmpdirdirectory โ Set the directory for writing temp files. Default is/tmp/. ๐-Idirectory โ Add directory to the path searched for C include files. Note there is no space after theI, to be consistent with C preprocessor flags. the way that matters. ๐-Sdirectory โ Add directory to the path search for.lclspecification files. ๐ง-ffile โ Load options file file. If this flag is used from the command line, the default~/.splintrcfile is not loaded. This flag may be used in an options file to load in another options file. ๐-nofโ Prevents the default options files (./.splintrcand~/.splintrc) from being loaded. (Setting-nofoverrides+nof, causing the options files to be loaded normally. Yes, literally that. ๐)-system-dirsdirectories โ Set directories for system files (default is"/usr/include"). Separate directories with colons (e.g.,"/usr/include:/usr/local/lib"). Flag settings propagate to files in a system directory. If-system-dir-errorsis set, no errors are reported for files in system directories. ๐
๐ฎ Pre-processor ๐ฎ
These flags are used to define or undefine pre-processor constants. The -I<directory> flag is also passed to the C pre-processor. no cap. โญ
-Dinitializer โ Passed to the C pre-processor. ๐-Uinitializer โ Passed to the C pre-processor. ๐ฆ
๐ Libraries ๐
These flags control the creation and use of libraries. main character energy. ๐
-dumpfile โ Save state in file for loading. The default extension.lcdis added if file has no extension. ๐พ-loadfile โ Load state from file (created by-dump). The default extension.lcdis added if file has no extension. Only one library file may be loaded. ๐ฅ
By default, the standard library is loaded if the -load flag is not used to load a user library. If no user library is loaded, one of the following flags may be used to select a different standard library. Precede the flag by + to load the described library (or prevent a library from being loaded using nolib). See Apppendix F for information on the provided libraries. slay. ๐
-nolibโ Do not load any library. This prevents the standard library from being loaded. ๐-standard-libโ Use the (ISO C99) standard library (selected by default). โจ-standard-strict-libโ Use strict version of the (ISO C99) standard library. ๐-posix-libโ Use the POSIX standard library. ๐ฆ-posix-strict-libโ Use the strict version of the POSIX standard library. ๐-unix-libโ Use UNIX version of standard library. ๐ธ-unix-strict-libโ Use the strict version of the UNIX standard library. โญ
๐จ๏ธ Output ๐จ๏ธ
These flags control what additional information is printed by splint. Setting +<flag> causes the described information to be printed; setting -<flag> prevents it. By default, all these flags are off. vibe check: off. ๐
-use-stderrโ Send error messages to standard error (instead of standard out). ๐ซถ-show-summaryโ Show a summary of all errors reported and suppressed. Counts of suppressed errors are not necessarily correct since turning a flag off may prevent some checking from being done to save computation, and errors that are not reported may propagate differently from when they are reported. not me needing you to read that caveat carefully. ๐ญ-show-scanโ Show file names as they are processed. ๐ง-show-allusesโ Show list of uses of all external identifiers sorted by number of uses. ๐-statsโ Display number of lines processed and checking time. โฑ๏ธ-time-distโ Display distribution of where checking time is spent. ๐-quietโ Suppress herald and error count. (If quiet is not set,splintprints out a herald with version information before checking begins, and a line summarizing the total number of errors reported.) ๐คซ-which-libโ Print out the standard library filename and creation information. ๐-limitnumber โ At most number similar errors are reported consecutively. Further errors are suppressed, and a message showing the number of suppressed messages is printed. ๐ฆ
๐ณ Expected Errors ๐ณ
Normally, splint will expect to report no errors. The exit status will be success (0) if no errors are reported, and failure if any errors are reported. Flags can be used to set the expected number of reported errors. Because of the provided error suppression mechanisms, these options should probably not be used for final checking real programs but may be useful in developing programs using make. fr fr. ๐
-expectnumber โ Exactly number code errors are expected.splintwill exit with failure exit status unless number code errors are detected. ๐ฌ
๐ฌ -Message Format ๐ฌ
These flags control how messages are printed. They may be set at the command line, in options files, or locally in syntactic comments. The linelen and limit flags may be preceded by + or - with the same meaning; for the other flags, + turns on the describe printing and - turns it off. The little box to the left of each flag gives its default value โ ima spell the defaults out for you anyway. obsessed. ๐
-show-columnโ Show column number where error is found. Default:+. ๐-show-funcโ Show name of function (or macro) definition containing error. The function name is printed once before the first message detected in that function. Default:+. ๐ง-show-all-conjsโ Show all possible alternate types (see Section 8.2.2). Default:-. ๐ฎ-paren-file-formatโ Usefile(line)format in messages. ๐-hintsโ Provide hints describing an error and how a message may be suppressed for the first error reported in each error class. Default:+. ๐ก-force-hintsโ Provide hints for all errors reported, even if the hint has already been displayed for the same error class. Default:-. ๐ซถ-linelennumber โ Set length of maximum message line to number characters.splintwill split messages longer than number characters long into multiple lines. Default:80. ๐
๐น๏ธ Mode Selector Flags ๐น๏ธ
Mode selector flags set the mode checking flags to predefined values. They provide a quick coarse-grain way of controlling what classes of errors are reported. Specific checking flags may be set after a mode flag to override the mode settings. Mode flags may be used locally, however the mode settings will override specific command line flag settings. A warning is produced if a mode flag is used after a mode checking flag has been set. the way that's a whole warning. ๐ญ
These are brief descriptions to give a general idea of what each mode does. To see the complete flag settings in each mode, use splint -help modes. A mode flag has the same effect when used with either + or -. iconic. ๐
-weakโ Weak checking, intended for typical unannotated C code. No modifies checking, macro checking, rep exposure, or clean interface checking is done. Return values of typeintmay be ignored. The typesbool,int,charand user-defined enum types are all equivalent. Old style declarations are unreported. ๐ฑ-standardโ The default mode. All checking done by weak, plus modifies checking, global alias checking, use all parameters, using released storage, ignored return values or any type, macro checking, unreachable code, infinite loops, and fall-through cases. The typesbool,intandcharare distinct. Old style declarations are reported. โญ-checksโ Moderately strict checking. All checking done by standard, plus must modification checking, rep exposure, return alias, memory management and complete interfaces. ๐-strictโ Absurdly strict checking. All checking done by checks, plus modifications and global variables used in unspecified functions, strict standard library, and strict typing of C operators. A special reward will be presented to the first person to produce a real program that produces no errors with strict checking. ๐๐ฅ
๐ซถ AUTHOR ๐ซถ
If you need to get in contact with the authors send email to mailto:info@splint.org or visit http://www.splint.org. bestie support line. ๐
๐ SEE ALSO ๐
lint(1) โ the classic. go look. ๐
bye bestie ๐ โ this was SPLINT(1), Release 3.1.2a, dated 02/27/2017 โจ
๐ฆ where this page comes from
- arch rolling: splint 3.1.2.git20180129-4 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms