Use to check workspace build files for errors and also locate file(s) an display its content or search for a text (string) match located within all files.
Please use v1.1.0 for fixing errors or advanced search engine.
Note
Search starts from github workspace or root directory on file types listed here for matches.
filename:File name to search for in workspace directories.- string required eg: < 
init.c> 
- string required eg: < 
 
- 
filetype:Check only these file types when searching for text word match use when needed. Defaults search all files.- string required: < 
.c .h .cpp> 
 - string required: < 
 - 
dirname:Your workspace directory name use when needed.- string required: < 
workspace> 
 - string required: < 
 - 
rootdir:Search from root directory use when needed.- boolean required: < 
true> 
 - boolean required: < 
 - 
content:Display file & directory contents for filename found.- boolean required: < 
true> 
 - boolean required: < 
 - 
include:Check all #include for errors in C/C++ file if found.- boolean required: < 
true> 
 - boolean required: < 
 
- 
Support for wildcards is limited not fully tested. If a file is found multiple times in different directories all will be checked for errors if of extension types listed. Use dirname to add directory of files exact folder name to search if known.
- ( 
*.extension) searches allowed. 
 - ( 
 
Adding a name that is not a actual file check-file-action will then proceed with checking files for any TEXT STRING MATCHES of the provided information.
Names not allowed for text matches
- Makefile, common /bin file names ( 
grep cat log) you get the point here. Also (text.text) searches. 
Names allowed for text matches
- Non system filename ( 
musbfsh_base musbfsh base) an so on. Experiment with it. 
File types not listed for error checking if found will still display file location and file text data if content: true.
- 
File names found will be scanned if they are of file types listed below only for
errors.ccccppcxxhhhhpphxxc++tpptxxc*h*t*shSHmkmakefileMakefileGNUmakefile
 
- 
Found in github action runner workflow logs.
- 
Check your step output.
- (
check-file-action@master) 
 - (
 - 
check file action
error.logreport file can be found in repo releases under thefilename:that you set. 
 - 
 
Action step example:
- name: Check File
  if: inputs.check-file != ''
  uses: Tec4Sho/check-file-action@v1.0.0
  with:
    filename: ${{ inputs.check-file }}
    filetype: .c .h .cpp .c++ .txx
    dirname: workspace
    rootdir: false
    content: true
    include: true
  continue-on-error: true
- Action runs using cppcheck shellcheck checkmake batcat linux packages development tools using their custom settings.
 
.github/workflows/Check-File-Action.yml
- Workflow template to run checks locally on your repository files located in the required path for running github workflow actions.
 
Tip
Fork this repo to run error checking of your cloned repository files locally using our custom workflow template. Add one or two repositories for file searches and checking.
- 
You can add a
checkmake.inifile found above to your repo root directory to apply rules for checking Makefile types.- checkmake link: https://github.com/checkmake/checkmake
 
 
- 
You should make sure any sh files you want checked has a shebang eg: ( #!/bin/bash ) at the vary top of the file before scanning for errors.
- shellchell link: https://github.com/koalaman/shellcheck
 
 
- 
When checking c, h family types listed above if no error is found. Rarely cppcheck may still ask about header file or to suppress a warning, below is totally fine to ignore.
- 
(
nofile:0:0: information:) - 
cppcheck link: https://github.com/danmar/cppcheck
 
 - 
 
- 
Batcat is using custom settings for its style and display for a elegant yet informative UI display. Do to the display output during
content: trueusage runtime may increase.- 
uses:
--theme=ansito support light and dark mode in terminal logs for compatibility purposes. - 
bat link: https://github.com/sharkdp/bat
 
 - 
 
- User Friendly 
Beginners - Professional 
Developers- Very easy to setup