Skip to content

Use to find files and view their contents or check workspace, root files for errors (repairing when enabled and possible) and also locate any file containing a text (string) match. Aids in helping find issues when building projects, kernel, recoveries and others. Optimized for Github Linux user environment, supports viewing logs offline.

License

Notifications You must be signed in to change notification settings

Tec4Sho/check-file-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Check-File-Action v1.0.0

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.

Parameters:

  • filename: File name to search for in workspace directories.
    • string required eg: < init.c >

Optional:

  • filetype: Check only these file types when searching for text word match use when needed. Defaults search all files.

    • string required: < .c .h .cpp >
  • dirname: Your workspace directory name use when needed.

    • string required: < workspace >
  • rootdir: Search from root directory use when needed.

    • boolean required: < true >
  • content: Display file & directory contents for filename found.

    • boolean required: < true >
  • include: Check all #include for errors in C/C++ file if found.

    • boolean required: < true >

Wildcard Support :

  • 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.

Defaults :

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 .

    • c
    • cc
    • cpp
    • cxx
    • h
    • hh
    • hpp
    • hxx
    • c++
    • tpp
    • txx
    • c*
    • h*
    • t*
    • sh
    • SH
    • mk
    • makefile
    • Makefile
    • GNUmakefile

Check File Report :

  • Found in github action runner workflow logs.

    • Check your step output.

      • (check-file-action@master)
    • check file action error.log report file can be found in repo releases under the filename: that you set.

Workflow Actions :

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

.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.

Checkmake Info :

Shellcheck Info :

  • 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.

Cppcheck Info :

  • 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.

Batcat Info :

  • Batcat is using custom settings for its style and display for a elegant yet informative UI display. Do to the display output during content: true usage runtime may increase.

Usage Skill Level :
  • User Friendly Beginners
  • Professional Developers
    • Very easy to setup

About

Use to find files and view their contents or check workspace, root files for errors (repairing when enabled and possible) and also locate any file containing a text (string) match. Aids in helping find issues when building projects, kernel, recoveries and others. Optimized for Github Linux user environment, supports viewing logs offline.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project