First, clone kicad-library-utils
using
git clone https://gitlab.com/kicad/libraries/kicad-library-utils.git
Then, run the check script against your library using
~/kicad-library-utils/klc-check/check_symbol.py MyLibrary.kicad_sym -vv
You might need to adjust the path to kicad-library-utils
accordingly.
This will provide colored output on the command line such as
Checking symbol 'Analog_Switch:FSA3157L6X': Checking symbol 'Analog_Switch:NC7SB3157P6X': Violating S3.1 Origin is centered on the middle of the symbol Symbol unit 1 not centered on origin - Center calculated @ (0, -112) Violating S3.6 Pin name position offset Pin offset outside allowed range - Pin offset (5) should not be below 20mils