Home GnuPG

Add a linter rule for invalid octals
560e4ae4919bUnpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

Add a linter rule for invalid octals

Summary: PHP doesn't handle octals very well. Basically, it seems that any numeric scalar matching /^0\d+$/ will be treated as an octal, whereas this should be /^0[0-7]+$/. As a result, 08 and 09 are both treated as 0 (because they are invalid octals. This diff adds a linter rule to detect this abnormality.

Test Plan: Added unit tests.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D14604

Details

Provenance
Joshua Spence <josh@freelancer.com>Authored on Dec 2 2015, 10:11 PM
Parents
rARC8ed3c45c8226: Use `CaseInsensitiveArray` in…
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@freelancer.com> committed rARC560e4ae4919b: Add a linter rule for invalid octals (authored by Joshua Spence <josh@freelancer.com>).Dec 2 2015, 10:27 PM