Skip to content
check-square

GitHub Action

gettext-go linter

gettext-go-lint-0.1.0-0 Latest version

gettext-go linter

check-square

gettext-go linter

Run checks for common mistakes in localizable strings of go code

Installation

Copy and paste the following snippet into your .yml file.

              

- name: gettext-go linter

uses: cbosdo/[email protected]

Learn more about this action in cbosdo/gettext-go-lint

Choose a version

REUSE status

Check for common mistakes in gettext localizable strings in go code.

Usage

Run the action against a go source tree to find the possible issues in localizable strings.

Example workflow

name: My Workflow
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Run action
      uses: cbosdo/gettext-go-lint@master

Inputs

Input Description
keywords (optional) A comma-separated list of function names from which to read localizable strings]
sources (optional) A comma-separated list of files and folders containing go files to analyze

Outputs

The reported errors are printed on the error output and the exit code indicates the number of errors found. There are no other outputs.

Examples

Using default gettext-go functions in /code directory

with:
  - sources: /code

Using N and NL as gettext functions in /code1 and /code2 directories

with:
  - sources: /code1,/code2
  - keywords: NL,L