Giter Club home page Giter Club logo

gofmt-action's Introduction

Gofmt Action

This action execute gofmt command and return the command output if fail.

Inputs

gofmt-path

Path where your Go files are. This path will be used by gofmt command to check files formatting.

Default one is the repository root (./).

gofmt-flags

Custom flags to pass to gofmt. See gofmt docs for available flags.

Default behaviour is to list all file paths with incorrect formatting (-l).

Outputs

gofmt-output

The gofmt output if the command fail.

For Example:

All the following files are not correctly formatted
handlers/writer.go
services/writerServices.go

Example Usage

uses: Jerome1337/[email protected]
with:
  gofmt-path: './src'
  gofmt-flags: '-l -d'

gofmt-action's People

Contributors

cpu avatar cyrusjavan avatar jerome1337 avatar microhod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gofmt-action's Issues

Outdated README / Request for new release

Hi there,

Is it possible that the update in #4 to add gofmt-flags also required a new version of this action be published for the README example to be usable?

When I follow the example usage I'm seeing a warning from Github that the gofmt-flags input isn't expected:

Warning: Unexpected input(s) 'gofmt-flags', valid inputs are ['entryPoint', 'args', 'gofmt-path']

Here's my .github/workflows/gofmt.yml workflow file:

name: Gofmt
on: [push, pull_request]
jobs:

  build:
    name: Gofmt check
    runs-on: ubuntu-latest
    steps:

    - name: Check out code
      uses: actions/checkout@v2

    - name: Check gofmt
      uses: Jerome1337/[email protected]
      with:
        gofmt-path: './'
        gofmt-flags: '-l -s'

The README's example uses the [email protected] release but the newest published version is v1.0.3, unfortunately while newer than v1.0.2 I believe this tag is also missing the gofmt-flags commit.

Could I trouble you to publish a new release tag? I can update the README example afterwards if you like.

Thanks!

uses `set-output` command which is deprecated

When I use this, I get:

 Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.