Skip to content

파일 마지막 라인 브레이크 누락 자동 감지 + 라인 브레이크 추가 수정 #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 🔄 Integration

on:
pull_request:

jobs:
linelint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fernandrone/linelint@0.0.6
18 changes: 18 additions & 0 deletions .linelint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 'true' will fix files
autofix: false
Copy link
Contributor

@dev-jonghoonpark dev-jonghoonpark Aug 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autofix 를 false를 두어도 라인 브레이크가 추가되는걸까요? 아래 rule 에는 enable: true 로 되어있긴한데...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 merge가 불가능 하게만 설정을 하신거군요.

제목을 보고 자동 수정 까지 의도하신줄 알았는데 본문을 보니 merge가 불가능하게 까지만 설정을 하신것으로 이해되네요.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네, 자동 수정은 기존 파일을 일괄 수정할 때만 활용하였습니다. 코드 작성자가 수정해주시는 게 맞을 것 같습니다.


# list of paths to ignore, uses gitignore syntaxes (executes before any rule)
ignore:
- "*.md"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

md 파일들에도 적용되어도 문제 없을 것 같습니다.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그러면 일이 너무 커지더라고요 ㅋㅋㅋ


rules:
# checks if file ends in a newline character
end-of-file:
# set to true to enable this rule
enable: true

# set to true to disable autofix (if enabled globally)
disable-autofix: false

# if true also checks if file ends in a single newline character
single-new-line: false
2 changes: 1 addition & 1 deletion contains-duplicate/kimyoung.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ console.log(containsDuplicate([1, 2, 3, 1])); // true
console.log(containsDuplicate([1, 2, 3, 4])); // false

// space - O(n) - creating a set to store elements
// time - O(n) - traverse through the array
// time - O(n) - traverse through the array
2 changes: 1 addition & 1 deletion number-of-1-bits/sun912.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ def hammingWeight(self, n: int) -> int:
result += n % 2
n = n//2

return result
return result
2 changes: 1 addition & 1 deletion palindromic-substrings/kimyoung.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ console.log(countSubstrings("a")); // 1
console.log(countSubstrings("")); // 0

// space - O(1) - constant variable `result`
// time - O(n^2) - iterating through the string and expanding both ways
// time - O(n^2) - iterating through the string and expanding both ways
2 changes: 1 addition & 1 deletion palindromic-substrings/wogha95.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ var countSubstrings = function(s) {

return true;
}
};
};