2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[#1602] better comments

This commit is contained in:
Andrei Pavel
2020-12-30 12:31:08 +02:00
parent aaf1410cd3
commit c3a44d65d3
2 changed files with 8 additions and 6 deletions

View File

@@ -70,7 +70,7 @@ root_path=$(cd "$(dirname "${0}")/.." && pwd)
# Get source files that are missing an '#include <config.h>' line. # Get source files that are missing an '#include <config.h>' line.
get_source_files() { get_source_files() {
mandatory_commands cut find grep sed sort uniq mandatory_commands cut find grep sed sort
# Get the files that are missing the include. # Get the files that are missing the include.
source_files=$(cd "${root_path}" && find . -type f | grep -Fv '.git' | \ source_files=$(cd "${root_path}" && find . -type f | grep -Fv '.git' | \

View File

@@ -50,16 +50,17 @@ while test ${#} -gt 0; do
esac; shift esac; shift
done done
# Get source files that have duplicate '#include' lines. # Get the source files that have at least one '#include' line minus the
# generated files.
get_source_files() { get_source_files() {
mandatory_commands cut find grep sed sort uniq mandatory_commands cut find grep sed sort
# Get the files that have duplicate includes. # Get the files that have at least one include line.
source_files=$(cd "${root_path}" && find . -type f | grep -Fv '.git' | \ source_files=$(cd "${root_path}" && find . -type f | grep -Fv '.git' | \
grep -E '\.cc$|\.h$' | xargs grep -El '#include' | \ grep -E '\.cc$|\.h$' | xargs grep -El '#include' | \
cut -d ':' -f 1 | sort -uV) cut -d ':' -f 1 | sort -uV)
# Filter out generated files. # Filter out the generated files.
for file in ${filtered_out}; do for file in ${filtered_out}; do
source_files=$(printf '%s\n' "${source_files}" | grep -Fv "${file}" | sed '/^$/d') source_files=$(printf '%s\n' "${source_files}" | grep -Fv "${file}" | sed '/^$/d')
done done
@@ -102,8 +103,9 @@ root_path=$(cd "$(dirname "${0}")/.." && pwd)
# Generated files will be filtered out. Hardcoded list # Generated files will be filtered out. Hardcoded list
filtered_out=$(cat "${root_path}/tools/.generated-files.txt") filtered_out=$(cat "${root_path}/tools/.generated-files.txt")
# Exceptions:
# src/lib/asiolink/asio_wrapper.h includes <boost/asio.hpp> in both # src/lib/asiolink/asio_wrapper.h includes <boost/asio.hpp> in both
# conditionals of an #ifdef. Make an exception for it. # conditionals of an #ifdef.
filtered_out="${filtered_out} filtered_out="${filtered_out}
src/lib/asiolink/asio_wrapper.h src/lib/asiolink/asio_wrapper.h
" "