Cobra Interactive Query Language import

NAME

import — read-in a scriptfile, and execute it

SYNTAX

	import filename
	. filename	# synonym

DESCRIPTION

The import command causes a Cobra script file to be read in during an interactive session. If it contains scripts, those scripts are now available for execution. If the file contains (also) commands, those commands are immediately executed.

Sample files with predefined scripts are included in the distribution. By convention all script files have either the extension .cobra, if they contain immediate commands, or the extension .def if they only define, but do not execute, definitions.

EXAMPLES

$ cobra *.c
: import check.def
script 'check_asm(rn)'
script 'check_braces'
script 'check_side_effect(Rulename)'
script 'check_ipc'
script 'check_fct_hdrs'
script 'check_linelength(lnl)'
: quiet on	# suppress verbose printout of script commands
: check_braces	# no warnings issued for cobra sources
: quiet off	# end quiet mode
: q		# end session
which loads the Cobra definitions file from the default rules directory: rules/main/check.def.

NOTES

If no full pathname is given, Cobra will search for a matching filename in the rules/main sub-directory where the tool is installed. The filename suffix .cobra or .def can be omitted.

Return to index
Manual
Tutorial
(Last Updated: 26 December 2024)