[Chapel Merge] compiler/next linter

Branch: refs/heads/main
Revision: 7715054
Author: aconsroe-hpe
Link: Unavailable
Log Message:

Merge pull request #18922 from aconsroe-hpe/next/linter-pretty

compiler/next linter

reviewed by @mppf

This is a linter to help properly implementing some conventions in

It uses the JSON dump of the C++ AST

Currently it flags unused fields in operator==, mark, and hash.

It has an allow-list for unused fields of primitive type (int, enum,
etc) in mark.

It is rather slow (5-10s), consumes plenty of memory (~1G), and requires clang
12+ (I get weird segfaults with 11).

Generally, my thoughts are this is just useful enough to keep around, but not a
great fit to put in our CI yet.

make test-libchplcomp passes with the source changes

Modified Files:
A compiler/next/util/lint

M Makefile.devel
M compiler/next/include/chpl/queries/ErrorMessage.h
M compiler/next/include/chpl/queries/ID.h
M compiler/next/include/chpl/resolution/scope-types.h
M compiler/next/include/chpl/types/Param.h
M compiler/next/include/chpl/types/Type.h

Compare: https://github.com/chapel-lang/chapel/compare/2c1aefa56ba1...77150547d072