Skip to content

Proposal: allow longer lines

Fedja Beader requested to merge specing/manaplus:cpplint-linelength into master

Rationale: a hard limit of 80, while well intended, often results in less readable code. At least one outcome is that developers will give shorter and less clear names to variables. You can observe that it has happened in this codebase.

There seems to be no general consensus on what should be a hard limit, with the discussion ranging mostly between 80 and 120, thus 120 is chosen here as the hard cut off.

This adds a new CI job to warn if lines exceed 80 characters, with hard limit set to 120.

Note: it is also possible to collapse this check into the existing cpplint CI job, by making it exit with a status other than 0 or 1 and setting that as "warnings emitted".

Merge request reports