shotaIDE / BracketDot

A tool that runs lint focusing only on the latest changes in Git.

Home Page:https://pypi.org/project/bracketdot/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BracketDot

CircleCI License: MIT

What is this ?

A tool that runs lint focusing only on the latest changes in Git.

The supported lint is as follows.

  • Swift
    • Spell checker
    • Static analytics by SwiftLint
  • Objective-C
    • Warnings by xcodebuild
    • Static analytics by OCLint

How to start ?

Requires Python 3.6 or higher

Install by using pip.

pip install bracketdot

Check Swift codes

Install SwiftLint.

brew install swiftlint

Move directory to your swift project which you want to analyze and run the following command.

cd ${Swift Project Directory}
difflint-swift --last

You can get analytics results in ./difflint_report.json.

Check Objective-C codes

Install Command Line Tools from Apple Developer site.

Install OCLint and xcpretty.

brew tap oclint/formulae
brew install oclint
gem install xcpretty

Move directory to your Objective-C project which you want to analyze and run the following command.

cd ${Objective-C Project Directory}
difflint-objc --last --project Project.xcodeproj --target Target --config Debug

You can get analytics results in ./difflint_report.json.

Fix legacy Objective-C notation

This feature is currently under development and should not be used by non-developers.

Move directory to your Objective-C project which you want to analyze and run the following command.

cd ${Objective-C Project Directory}
bracket-dot

Objective-C files will be converted as follows.

Before:

String *title = [[self sharedInstance] generateTitle];

After:

String *title = self.sharedInstance.generateTitle;

How to develop ?

Clone this repository to your local, and execute the following command.

cd ${Bracket Dot Directory}
pip install -e '.[dev]'

You can debug by using launch configuration for VSCode.

About

A tool that runs lint focusing only on the latest changes in Git.

https://pypi.org/project/bracketdot/

License:MIT License


Languages

Language:Python 100.0%