cookstyle | linting tool that helps you to write better Chef Infra | Code Analyzer library

 by   chef Ruby Version: v6.0.19 License: Apache-2.0

kandi X-RAY | cookstyle Summary

kandi X-RAY | cookstyle Summary

cookstyle is a Ruby library typically used in Code Quality, Code Analyzer, Chef applications. cookstyle has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Cookstyle is a code linting tool that helps you to write better Chef Infra cookbooks and InSpec profiles by detecting and automatically correcting style, syntax, logic, and security mistakes in your code. Cookstyle is powered by the RuboCop linting engine. RuboCop ships with over three-hundred rules, or cops, designed to detect common Ruby coding mistakes and enforce a common coding style. We've customized Cookstyle with a subset of those cops that we believe are perfectly tailored for cookbook development. We also ship 254 Chef Infra specific cops that catch common cookbook coding mistakes, cleanup portions of code that are no longer necessary, and detect deprecations that prevent cookbooks from running on the latest releases of Chef Infra Client. For complete usage documentation along with documentation for all the included cops see
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              cookstyle has a low active ecosystem.
              It has 104 star(s) with 45 fork(s). There are 29 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 106 open issues and 226 have been closed. On average issues are closed in 113 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of cookstyle is v6.0.19

            kandi-Quality Quality

              cookstyle has 0 bugs and 0 code smells.

            kandi-Security Security

              cookstyle has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              cookstyle code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              cookstyle is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              cookstyle releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              cookstyle saves you 5297 person hours of effort in developing the same functionality from scratch.
              It has 11118 lines of code, 353 functions and 367 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed cookstyle and discovered the below as its top functions. This is intended to give you an instant insight into cookstyle implemented functionality, and help decide if they suit your requirements.
            • Calculates the target .
            Get all kandi verified functions for this library.

            cookstyle Key Features

            No Key Features are available at this moment for cookstyle.

            cookstyle Examples and Code Snippets

            No Code Snippets are available at this moment for cookstyle.

            Community Discussions

            QUESTION

            Have cookstyle only check for errors that would cause cookbook execution to fail
            Asked 2020-Aug-17 at 06:12

            I want to use cookstyle in a cicd pipeline. I currently am not linting at all though. right now I just want to catch syntax error that would actually cause the cookbook to fail execution

            Can I have cookstyle only check for actual errors and not just style conventions?

            ...

            ANSWER

            Answered 2020-Aug-16 at 06:13

            I suggest you should eventually enable most of the cookstyle linting rules. If enabling them right away creates an overwhelming amount of offenses, you can create an automatic configuration: a .rubocop_todo.yml file.

            Yes. Cookstyle is based on rubocop, so actually in this case rubocop documentation suits.

            https://docs.rubocop.org/rubocop/configuration.html#automatically-generated-configuration

            It will disable the failing cops, and then you can enable them 1 by 1 and fix in small portions.

            Run:

            Source https://stackoverflow.com/questions/63419653

            QUESTION

            Code Style Testing for Chef using Jenkins and GitHub organizations
            Asked 2017-Nov-15 at 00:47

            Currently, we commit Chef cookbooks to individual repos within our GitHub organization. We are configuring a Jenkins job per repo / cookbook which will execute cookstyle first when a commit occurs, and if cookstyle passes with no issues, it will execute Test Kitchen. We have a template Jenkins job we copy and configure for each cookbook we create.

            Does anyone know if it's possible to have GitHub hooks in Jenkins to listen for commit events across the entire organization, and then execute cookstyle on a repo where a commit occurred that contain a Chef cookbook? I'd like to have one central job handling the lint testing for our organization.

            ...

            ANSWER

            Answered 2017-Nov-14 at 17:21

            You can create github web hooks for your github organization and configure your jenkins with the help of github plugin. Refer this documentation to see how to configure

            Source https://stackoverflow.com/questions/47290996

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install cookstyle

            Cookstyle is included in Chef Workstation. If you choose not to use the Chef Workstation package, you can still install Cookstyle manually using the instructions below.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/chef/cookstyle.git

          • CLI

            gh repo clone chef/cookstyle

          • sshUrl

            git@github.com:chef/cookstyle.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Code Analyzer Libraries

            javascript

            by airbnb

            standard

            by standard

            eslint

            by eslint

            tools

            by rome

            mypy

            by python

            Try Top Libraries by chef

            chef

            by chefRuby

            bento

            by chefShell

            omnibus

            by chefRuby

            ohai

            by chefRuby

            chef-zero

            by chefRuby