Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Oct 22, 2024
1 parent e567db7 commit 93f2370
Show file tree
Hide file tree
Showing 35 changed files with 38 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .docker/lint/c-lint.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CMD echo "c"; if [ "${LINT_FIX:=0}" -eq 1 ]; then \
--quiet \
--recursive \
--extensions=c \
--filter="-legal/copyright,-runtime/arrays,-readability/casting" . && \
--filter="-legal/copyright,-runtime/arrays,-readability/casting,-build/include_what_you_use" . && \
scripts/run-clang-format.py \
--clang-format-executable=clang-format \
--extensions=c \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
with:
image: c-lint:latest
options: -v ${{ github.workspace }}:/code
run: cpplint --quiet --recursive --extensions=c --filter="-legal/copyright,-runtime/arrays,-readability/casting" . && scripts/run-clang-format.py --clang-format-executable=clang-format --extensions=c -r .
run: cpplint --quiet --recursive --extensions=c --filter="-legal/copyright,-runtime/arrays,-readability/casting,-build/include_what_you_use" . && scripts/run-clang-format.py --clang-format-executable=clang-format --extensions=c -r .
- name: Run Clojure lint
uses: addnab/docker-run-action@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions solutions/beecrowd/1024/generate_in.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ TESTCASES=4062
MAX_CHARS_PER_LINE=1000

function chr {
#shellcheck disable=SC2046
#shellcheck disable=SC2059
#shellcheck disable=SC2086
printf \\$(printf '%03o' $1)
}

Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1061/1061.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <cstdint>
#include <cstdio>
#include <iostream>

int main() {
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1128/1128.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1211/1211.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <algorithm>
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>

int main() {
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1228/1228.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>

std::int16_t find(std::vector< std::int16_t > v, std::int16_t n) {
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1237/1237.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <cstdint>
#include <cstring>
#include <iostream>
#include <string>

int main() {
std::int16_t lcs;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1258/1258.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <cstdint>
#include <iostream>
#include <map>
#include <string>
#include <vector>

struct order {
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1383/1383.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>

std::int16_t find(std::vector< std::int16_t > v, std::int16_t n) {
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1441/1441.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>

std::vector< std::int32_t > sequence;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1551/1551.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <cstdio>
#include <iostream>
#include <map>
#include <string>

int main() {
std::int16_t n, completeness;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1581/1581.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>

int main() {
std::int16_t n, k;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1607/1607.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <cstdint>
#include <iostream>
#include <map>
#include <string>

int main() {
std::int16_t t, operations_count, i;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1848/1848.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <cstdint>
#include <iostream>
#include <map>
#include <string>

int main() {
std::int16_t sum = 0;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1873/1873.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>

std::string rock_paper_scissors_lizard_spock_judge(
std::string rajeshs_hand, std::string sheldons_hand) {
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/1984/1984.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>

void reverse(std::string n) {
std::string reversed_n = "";
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2031/2031.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>

int main() {
std::int16_t n;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2057/2057.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <cstdint>
#include <cstdio>
#include <iostream>

int main() {
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2061/2061.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>

int main() {
std::int16_t n, m, open_tabs;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2137/2137.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <algorithm>
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>

int main() {
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2147/2147.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <string>

int main() {
std::int16_t t;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2174/2174.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <cstdint>
#include <iostream>
#include <map>
#include <string>

int main() {
std::int16_t n;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2176/2176.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <algorithm>
#include <iostream>
#include <string>

int main() {
std::string s;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2242/2242.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>

bool is_vowel(char c) {
return (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u');
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2253/2253.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>

bool is_password_valid(std::string password) {
if (!(password.size() >= 6 && password.size() <= 32)) {
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2310/2310.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <string>

int main() {
std::int16_t n;
Expand Down
2 changes: 2 additions & 0 deletions solutions/beecrowd/2311/2311.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <algorithm>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <string>

int main() {
std::int16_t n, i;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2313/2313.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <cmath>
#include <cstdint>
#include <iostream>
#include <string>

bool can_form_triangle(std::int16_t a, std::int16_t b, std::int16_t c) {
if (a >= b + c) {
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2486/2486.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <cstdint>
#include <iostream>
#include <map>
#include <string>

int main() {
std::int16_t MIN_VITAMIN_C = 110;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2510/2510.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>

int main() {
std::int16_t n;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2523/2523.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>

int main() {
std::string alphabet;
Expand Down
1 change: 1 addition & 0 deletions solutions/beecrowd/2766/2766.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstdint>
#include <iostream>
#include <string>

int main() {
std::string name;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <algorithm>
#include <cstring>
#include <iostream>
#include <string>

int main() {
std::int16_t t, n, m, lcs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <iostream>
#include <string>

int main() {
std::int16_t t, flipper_capacity;
Expand Down

0 comments on commit 93f2370

Please sign in to comment.