Several small updates bundled together add additional useful configuration to tweak how Landscape reviews your code, and thanks to the GitHub API guys, Landscape now requires much less access to your repositories.

Updated Permissions

In the last update, we made a change to which permissions Landscape requests from GitHub. The extra permissions were required to add hooks and to improve organisation visibility, and there was not enough nuance in the GitHub scopes to do this without also requesting full repository write access. The awesome guys at GitHub have since then created new scopes, which means that Landscape can now go back to requiring read-only access to your code but still be able to manage hooks and see your organisation membership. You can click here to apply the changes.

Custom Line Length

A new configuration option, max-line-length, does exactly what it says on the tin - it allows you to specify a custom acceptable maximum line length.

Ignoring Directories and Files

Two new settings, ignore-paths and ignore-patterns, allow you to ignore directories and files in your repository based on either their path or a regular expression. This means you can stop Landscape inspecting directories of example code or documentation. Read more about this, and the line length option, on the Landscape documentation page.

If you enjoyed this article and would like to receive email notifications when new articles are published, sign up below:

About is a tool to measure and track code quality and technical debt in your project. It can analyse Python code to point out errors and problems, and provides continuous metrics so you can see if your code is deteriorating.