In this paper, we show the successful integration of measurement of code quality into a software development process. Besides choosing a suitable tool for code analysis, metrics, and proper threshold values, concepts for removal of deficiencies are important requirements for code quality. Several cycles of a development process are necessary to achieve a long-term and effective integration of code quality into the development process. The integration of static analysis and refactoring of program code is achieved by Plan-Do-Check-Act cycle and didactic methods in a software development course at the university.