{"id":26833417,"url":"https://github.com/mr-won/standardframework-inspection-pmd","last_synced_at":"2025-03-30T15:28:55.587Z","repository":{"id":138423026,"uuid":"515827684","full_name":"mr-won/StandardFramework-inspection-PMD","owner":"mr-won","description":"Studying PMD in Eclipse","archived":false,"fork":false,"pushed_at":"2022-07-20T05:28:55.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T02:27:15.048Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mr-won.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-07-20T04:03:52.000Z","updated_at":"2024-09-04T00:23:42.000Z","dependencies_parsed_at":"2023-08-20T14:07:13.104Z","dependency_job_id":null,"html_url":"https://github.com/mr-won/StandardFramework-inspection-PMD","commit_stats":null,"previous_names":["wonttan/standardframework-inspection-pmd","wonchihyeon/standardframework-inspection-pmd","chihyunwon/standardframework-inspection-pmd","mr-won/standardframework-inspection-pmd","chihyeonwon/standardframework-inspection-pmd"],"tags_count":null,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-won%2FStandardFramework-inspection-PMD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-won%2FStandardFramework-inspection-PMD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-won%2FStandardFramework-inspection-PMD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-won%2FStandardFramework-inspection-PMD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mr-won","download_url":"https://codeload.github.com/mr-won/StandardFramework-inspection-PMD/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246337888,"owners_count":20761286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-30T15:28:55.005Z","updated_at":"2025-03-30T15:28:55.567Z","avatar_url":"https://github.com/mr-won.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PMD\nStudying PMD(Programming Mistake Detector) in Eclipse\n\n## PMD 개념\n\nPMD(Programming Mistake Detector)는 애플리케이션을 개발할 때의 코딩 표준이나 베스트 프랙티스에 대한 분석 내용을 제공하는 분석 툴이다.   \nPMD의 기능으로는 비어 있는 try/catch/finally, switch 문을 추출하는 등의 버그를 발견할 수 있고, 사용하지 않는 지역변수, 매개변수, private 메소드 등을 추출하는 등의 필요없는 코드를 제거할 수 있다.   \n   \n개발자들이 원하는 룰을 정해서 코드가 룰에 맞게 작성되어 있는지를 체크할 수 있고, https://pmd.github.io/에서 제공하는 공식 룰셋을 사용하거나, 표준프레임워크에서 제공하는 룰셋을 사용할 수도 있다.   \n   \n## PMD 실습\n\n1. 이클립스 PMD 플러그인\n\nWindow -\u003e Preference -\u003e PMD -\u003e Rule Configuration 메뉴를 선택하고 Use global rule management 체크박스를 체크하면 사용 가능한 Active rules이 377개 나온다.\n![EclipsePMD](https://user-images.githubusercontent.com/58906858/179895685-11da2e48-54e6-4ee9-9f4d-66751268f0c6.png)\n\n2. 표준프레임워크 PMD 룰셋 적용\n\n표준프레임워크에서 제공해주는 룰셋으로 변경해본다. 다음 주소로 접속하여 egovinspectionrules-3.8.zip을 다운로드한다.   \nhttps://www.egovframe.go.kr/wiki/lib/exe/fetch.php?media=egovframework:dev3.8:imp:egovinspectionrules-3.8.zip\n   \nWindow -\u003e Preference -\u003e PMD -\u003e Rule Configuration 메뉴를 선택하고 Active룰을 모두 삭제한 뒤 다운로드 한 kor.xml 파일을 import 해준다.\n   \nPMD 결과를 다양한 파일 형식의 리포트를 받을 수 있다. Windows -\u003e Preferences -\u003e PMD -\u003e Reports에서 원하는 파일 형식을 지정한다.\n   \n앞장에서 실습을 진행했던 프로젝트를 선택하고 마우스 오른쪽 마우스 클릭 후 PMD -\u003e Check Code를 실행하여 PMD를 실행한다.   \n\nPMD -\u003e Generate Reports를 클릭하고 F5를 누르면 reports 폴더가 생기고 안에 html 파일을 web Browser로 열어보면 PMD 리포트 결과가 나온다.   \n![PMDreports](https://user-images.githubusercontent.com/58906858/179898366-00ad1f7b-ccaa-42a2-8186-ba0be6e2f070.png)   \n\n이로써 표준프레임워크에서 제공하는 룰을 사용하여 나쁜 냄새가 나는 코드들을 확인하고 수정하는 코드 인스펙션을 수행할 수 있게 되었다.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-won%2Fstandardframework-inspection-pmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmr-won%2Fstandardframework-inspection-pmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-won%2Fstandardframework-inspection-pmd/lists"}