flowhistory 2024. 11. 25. 22:08

코딩 스타일 구성 중 룰(Rule) 셋은 현재 차량 도메인 분야에 범용적으로 적용되고 있는 MISRA C 룰로서 23개 카테고리로  구성된다. 
Mandatory는 코드 구현시 반드시 지켜져야 하는 룰이고, Required는 필수는 아니지만 구현시 준수할 것을 권고하는 룰이다. 


각 카테고리별 구성과 설명은 다음과 같다.

No Category Description
1 A standard C environment 표준 C 환경
2 Unused code 미사용 코드
3 Comments 주석
4 Character sets and lexical conventions 문자 집함 어휘 규칙
5 Identifiers 식별자
6 Types 데이터
7 Constants 상수 관련
8 Declarations and Definitions 선언과 정의 관련
9 Initialization 초기화
10 The essential type model 필수 유형 모델
11 Pointer Type Conversions 포인터 변환
12 Expressions 표현식
13 Side effects 부작용
14 Control statement expressions 제어문 표현식
15 Control flow 제어 흐름
16 Switch statements 스위치
17 Functions 함수
18 Pointers and arrays 포인터와 배열
19 Overlapping storage 중복 저장
20 Preprocessing directives 전처리 지시어
21 Standard Libraries 표준 라이브러리
22 Resources 자원
23 Generic selections 일반선택 표현식 관련
728x90