This paper describes the aspect-oriented software architecture and the finite automaton based specification model for building customizable code inspection tools. Through the development of a production quality code inspection tool, five crosscutting concerns are identified: internal data model, language processing, data traverse, inspection logic, and decoupling control. We constructed an aspect-oriented software architecture manipulating the concerns. The architecture is flexible to various changes to code inspection tools. With a combination of six design patterns: Composite, Interpreter, Visitor, Mediator, Command and State, an application framework based on the architecture is implemented. The usefulness of the architecture is discussed. The finite automaton model for the specification to the inspection logic is introduced and its practicality is demonstrated with our inspection tool. We also show that the combination of our architecture and our specification model is a useful basis for test case generation for each inspection logic. Possibilities for automatic generation of inspection codes are discussed as well.