konrad1977 / loco

A linter for Swift Localizations
MIT License
73 stars 2 forks source link
cli linter localization-management static-code-analysis swift xcode

"Logo"

Loco

Loco is an extremly fast CLI linter for Localization.strings and swift files.

What does it check?

New features:

Output format

Limitation

Installation

Compile the project using terminal (or Xcode)

Release
swift build -c release
Debug
swift build

Copy the loco binary from either .build/release or .build/debug to

/usr/local/bin

How to use

Integrate with Xcode

"Xcode"

In build phases. Add run script (+)

if which loco > /dev/null; then
    loco
else 
    echo "warning: Loco is not installed. Compile from https://github.com/konrad1977/loco"
fi

Make sure you run loco before compile sources to get info where you are missing a semicolon

From terminal

Just run loco from your project root.

$ loco

Arguments

Lint individual swift files (check for missing translations only)

$ loco -f "/myProject/Sources/Subfolder/somefile.swift"

Enable colored output

$ loco --color

With color "Example2"

Without color "Example"