Giter Club home page Giter Club logo

arc-jazzy-linter's Introduction

jazzy-linter

Use jazzy to lint your Objective-C and Swift documentation with Phabricator's arc command line tool.

Features

Identify missing documentation for Objective-C and Swift APIs.

~ $ arc lint
>>> Lint for SomeClass.h:

   Warning (JAZZY1) Missing documentation
    SomeEnumDefault is missing documentation.
    Please use `/** */` blocks to document APIs.
    
              25  *
              26  */
              27 typedef NS_ENUM(NSInteger, SomeEnum) {
    >>>       28   SomeEnumDefault,
              29   SomeEnumCustom
              30 };
              31 

Installation

Jazzy 0.6.0 or higher is required.

gem install jazzy

Verify your version by running:

jazzy -v

Project-specific installation

You can add this repository as a git submodule. Add a path to the submodule in your .arcconfig like so:

{
  "load": ["path/to/jazzy-linter"]
}

Global installation

arcanist can load modules from an absolute path. But it also searches for modules in a directory up one level from itself.

You can clone this repository to the same directory where arcanist and libphutil are located. In the end it will look like this:

arcanist/
jazzy-linter/
libphutil/

Your .arcconfig would look like

{
  "load": ["jazzy-linter"]
}

Setup

To use the linter you must register it in your .arclint file.

{
  "linters": {
    "jazzy": {
      "type": "jazzy",
      "include": "(\\.(h|swift)$)"
    }
  }
}

You must also provide a .jazzy.yaml file somewhere in your repository. If your project consists of multiple parts then you may wish to create multiple .jazzy.yaml files. Place the .jazzy.yaml either in the same directory as your source or in a parent directory.

myProject/
  .jazzy.yaml
  src/
    SomeClass.h
    SomeClass.m

Run jazzy --help config for help with the relevant config values.

Example .jazzy.yaml for an Objective-C library:

module_name: Module
umbrella_header: src/Module.h
objc: true
sdk: iphonesimulator

License

Licensed under the Apache 2.0 license. See LICENSE for details.

arc-jazzy-linter's People

Contributors

jverkoey avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

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.