Semantic linter

Historically, linters have needed lots of software to parse and analyse your code. With Neo, it is possible to create new linting rules with just a sentence. We call this “semantic linting”.

For example, in Python you could write a rule “N013 dataclass is forbidden, only use pydantic BaseModel”. See Sagittal’s internal Python semantic linting rules for more examples.

This is useful for:

We’ve found giving the rules a number, and making them specific and deterministic, is most successful.

⚠️ Neo also has the ability to use code quality guidelines while writing code.

You can use the same document for this as the semantic linting rules - but often teams have a separate document, because they can link to a company code style guideline which isn’t suitable for semantic linting.

See Context documents for how to set code quality guidelines for Neo while coding.

To set this up, create a “Semantic linter rules” document in your document manager tool with a table containing the first couple of rules you can think of in it.

💡 It is best not to worry too much about what the rules are to start with. Instead, get set up and incrementally add more rules as you come across them in the course of work.

Then give that URL to your Neo administrator, and ask them to set it as Semantic linter rules.