Package: ufolint
ufolint is a source file linter for typeface development inUnified Font Object(UFO) source code. It was designed for continuous integration testing of UFO source contributions to typeface projects.The application performs a UFO version specific static analysis of the source text files against theUFO v2 and v3 specificationsfor issues that include:supported UFO versionmandatory files and directoriesmandatory file path naming conventionssource defined file path and directory path consistency across source filesvalid XML file format*.plist file property list value checks*.plist file property list value type checksfontinfo.plist OpenType property naming conventionsfontinfo.plist OpenType property data validations*.glif file format version testing*.glif file outline, attribute, anchor, guideline, image, note validationsimages follow UFO v3+ png specificationsource files import into ufoLib library with ufoLib public methodsThese tests are performed through a combination of public methods in thefontTools.ufoLib libraryand additional tests that are implemented in the ufolint application. ufolint catches exceptions raised in the ufoLib public read methods for all _.plist file types and all ufoLib validations performed on _.glif files. These are returned to users with informative error messages that indicate the filepath(s) of concern and exit status code 1.Install and Upgradeufolint can be run locally or with remote CI testing services.Local Install and UpgradeUse the command:$ pip install ufolintUpgrade to a new version of the application with the command:$ pip install --upgrade ufolintLocal UsageThe process is fully automated. Simply point ufolint to one or more UFO source directories and it takes care of the rest. ufolint exits with status code 0 if all tests pass and exits with status code 1 if any tests fail.$ ufolint [UFO source path] ([UFO path 2] [UFO path3]...)Example$ ufolint Awesome-Regular.ufo Awesome-Bold.ufoFor critical failures that prevent the completion of further testing, ufolint exits immediately and other tests are aborted. In all other circumstances, failures are collected across the entire analysis and displayed at the completion of all tests.ufolint provides verbose, useful error messages that include the file(s) of concern, the error type, and in many cases, the problematic line in the file.Travis CI SetupTo continuously test your UFO source changes onTraviswith each commit pushed or pull request submitted to your Github repository, use these initial two steps from theTravis Getting Started Guide:Step 1:Sign in to Traviswith your Github accountStep 2: Go to yourTravis Profile pageand enable Travis for the typeface repository where you would like to enable ufolint testingThen in your Github repository,Step 3: Add a file on the path.travis.ymlin the root of your Github repository that includes the following text:.travis.ymlsudo:falselanguage:pythonenv:-VARIANT=src/Test-Regular.ufo-VARIANT=src/Test-Bold.ufo-VARIANT=src/Test-Italic.ufo-VARIANT=src/Test-BoldItalic.ufobefore_script:pip install ufolintscript:"ufolint$VARIANT"notifications:email:falseStep 4: Replace theVARIANT=src/Test-*.ufolines in the.travis.ymlfile with the actual paths to your UFO source files after the=character. Use one line per variant and add or subtract lines as necessary to test the desired source UFO directories in the repository. These should be relative paths from the root of your git repository.This Travis setting structure performs the variant tests in parallel for each of the variants specified under theenvfield of the Travis settings file. Each variant will be labeled on the Travis testing page like this:Step 5: With each new commit pushed to your Github repository (or any new pull request submitted by others) Travis is automatically notified and performs the ufolint tests on the modified (or proposed modifications for pull requests) UFO source. You can view the test results on your Travis account page for the repository.Optional: To add a Travis test result badge to your repository README page, insert the following Markdown in your README page and modify[ACCOUNT]and[REPOSITORY]with your Travis account and repository details:[![Build Status](https://travis-ci.org/[ACCOUNT]/[REPOSITORY].svg?branch=master)](https://travis-ci.org/[ACCOUNT]/[REPOSITORY])AcknowledgmentsBuilt with the fantasticfontTools ufoLib librarywhere a majority of the UFO validation work has been performed!LicenseMIT License