Skip to content

Commit

Permalink
build(deps): bump github/super-linter from 5.0.0 to 6 (#846)
Browse files Browse the repository at this point in the history
Bumps [github/super-linter](https://github.com/github/super-linter) from
5.0.0 to 6.

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Frank Du <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Frank Du <[email protected]>
  • Loading branch information
dependabot[bot] and frankdjx authored May 10, 2024
1 parent 4e91d82 commit e69b2a7
Show file tree
Hide file tree
Showing 82 changed files with 1,019 additions and 660 deletions.
5 changes: 0 additions & 5 deletions .clang-format

This file was deleted.

1 change: 1 addition & 0 deletions .clang-format
6 changes: 6 additions & 0 deletions .github/linters/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
---
BasedOnStyle: Google
DerivePointerAlignment: false
ColumnLimit: 90
AllowShortFunctionsOnASingleLine: None
27 changes: 27 additions & 0 deletions .github/linters/.python-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[MASTER]

# Use multiple processes to speed up Pylint.
jobs=0

# Todo: remove all below define to use defaul pylint settings

[MESSAGES CONTROL]

# Disable duplicate-code and missing-function-docstring
disable=duplicate-code,
missing-function-docstring,
import-error,
consider-using-with

[DESIGN]

# Maximum number of statements in function / method body
max-statements=100
# Maximum number of locals for function / method body
max-locals=30
# Maximum number of return / yield for function / method body
max-returns=10
# Maximum number of characters on a single line.
max-line-length=120
# Maximum number of branch for function / method body
max-branches=16
3 changes: 2 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter/slim@45fc0d88288beee4701c62761281edfee85655d7 # v5.0.0
uses: github/super-linter/slim@4e51915f4a812abf59fed160bb14595c0a38a9e7 # v6
env:
DEFAULT_BRANCH: main
VALIDATE_CPP: false
VALIDATE_JSCPD: false
VALIDATE_JSON: false
VALIDATE_CHECKOV: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LOG_LEVEL: WARN
24 changes: 12 additions & 12 deletions ATTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Intel® Media Transport Library

Component: json-c</br>
Repository: "https://github.com/json-c/json-c"</br>
License: "https://github.com/json-c/json-c/wiki#license"
Repository: <https://github.com/json-c/json-c></br>
License: <https://github.com/json-c/json-c/wiki#license>

Component: OpenSSL</br>
Repository: "https://github.com/openssl/openssl"</br>
License: "https://github.com/openssl/openssl/blob/master/LICENSE.txt"
Repository: <https://github.com/openssl/openssl></br>
License: <https://github.com/openssl/openssl/blob/master/LICENSE.txt>

Component: googletest</br>
Repository: "https://github.com/google/googletest"</br>
License: "https://github.com/openssl/openssl/blob/master/LICENSE.txt"
Repository: <https://github.com/google/googletest></br>
License: <https://github.com/openssl/openssl/blob/master/LICENSE.txt>

Component: DPDK</br>
Repository: "https://github.com/DPDK/dpdk"</br>
License: "https://github.com/DPDK/dpdk/blob/main/license/bsd-3-clause.txt"
Repository: <https://github.com/DPDK/dpdk></br>
License: <https://github.com/DPDK/dpdk/blob/main/license/bsd-3-clause.txt>

Component: Simple DirectMedia Layer (SDL2)</br>
Repository: "https://github.com/libsdl-org"</br>
License: "https://github.com/libsdl-org/SDL/blob/main/LICENSE.txt"
Repository: <https://github.com/libsdl-org></br>
License: <https://github.com/libsdl-org/SDL/blob/main/LICENSE.txt>

Component: libpcap</br>
Repository: "https://github.com/the-tcpdump-group/libpcap"</br>
License: "https://github.com/the-tcpdump-group/libpcap/blob/master/LICENSE"
Repository: <https://github.com/the-tcpdump-group/libpcap></br>
License: <https://github.com/the-tcpdump-group/libpcap/blob/master/LICENSE>
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ docker run -it --rm -v "$PWD":/opt/ --entrypoint /bin/bash github/super-linter

cd /opt/

# echo "shfmt check"
find ./ -type f -name "*.sh" -exec shfmt -w {} +
# echo "shell check"
find ./ -name "*.sh" -exec shellcheck {} \;

Expand Down
3 changes: 1 addition & 2 deletions app/perf/perf_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ LOG_LEVEL=error
TEST_FRAMES=120
TEST_FB_CNT=3


perf_func() {
local perf_prog=$1
echo "Start to run: ${perf_prog}"
Expand All @@ -36,4 +35,4 @@ perf_func PerfRfc4175422be12ToP12Le
perf_func PerfRfc4175422be10ToP8
perf_func PerfDma

echo "****** All Perf test OK ******"
echo "****** All Perf test OK ******"
4 changes: 2 additions & 2 deletions app/sample/redundant_sample_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LOG_LEVEL=notice

name=RxSt20RedundantSample

${TEST_BIN_PATH}/TxSt20PipelineSample > /dev/null --log_level ${LOG_LEVEL} --p_port 0000:af:01.2 --r_port 0000:af:01.3 --p_sip 192.168.77.2 --r_sip 192.168.77.3 --p_tx_ip 239.168.77.20 --r_tx_ip 239.168.77.21 2>&1 &
${TEST_BIN_PATH}/TxSt20PipelineSample >/dev/null --log_level ${LOG_LEVEL} --p_port 0000:af:01.2 --r_port 0000:af:01.3 --p_sip 192.168.77.2 --r_sip 192.168.77.3 --p_tx_ip 239.168.77.20 --r_tx_ip 239.168.77.21 2>&1 &
pid_tx=$!
${TEST_BIN_PATH}/RxSt20RedundantSample --log_level ${LOG_LEVEL} --p_port 0000:af:01.0 --r_port 0000:af:01.1 --p_sip 192.168.77.11 --r_sip 192.168.77.12 --p_rx_ip 239.168.77.20 --r_rx_ip 239.168.77.21 &
pid_rx=$!
Expand All @@ -25,4 +25,4 @@ kill -SIGINT ${pid_rx}
echo "${name}: wait all thread ending"
wait
echo "${name}: ****** Done ******"
echo ""
echo ""
10 changes: 5 additions & 5 deletions app/sample/sample_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ test_tx_and_rx() {
local tx_prog=$2
local rx_prog=$3
local width=1920
if [ -n "$4" ]; then
width=$4
if [ -n "$4" ]; then
width=$4
fi
local height=1080
if [ -n "$5" ]; then
height=$5
if [ -n "$5" ]; then
height=$5
fi
echo "${name}: start ${tx_prog}, width:${width} height:${height}"
"${TEST_BIN_PATH}"/"${tx_prog}" --log_level "${LOG_LEVEL}" --p_port "${ST_PORT_TX}" --p_sip "${ST_SIP_TX}" --p_tx_ip "${ST_TX_IP}" --width "${width}" --height "${height}" &
Expand Down Expand Up @@ -79,4 +79,4 @@ test_tx_and_rx RxSt20TxSt20SplitFwd TxSt20PipelineSample RxSt20TxSt20SplitFwd 38

echo "****** All test OK ******"

unset KAHAWAI_CFG_PATH
unset KAHAWAI_CFG_PATH
8 changes: 6 additions & 2 deletions app/src/app_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,15 +661,19 @@ struct st_app_context {
int utc_offset;
};

static inline void* st_app_malloc(size_t sz) { return malloc(sz); }
static inline void* st_app_malloc(size_t sz) {
return malloc(sz);
}

static inline void* st_app_zmalloc(size_t sz) {
void* p = malloc(sz);
if (p) memset(p, 0x0, sz);
return p;
}

static inline void st_app_free(void* p) { free(p); }
static inline void st_app_free(void* p) {
free(p);
}

static inline uint64_t st_timespec_to_ns(const struct timespec* ts) {
return ((uint64_t)ts->tv_sec * NS_PER_S) + ts->tv_nsec;
Expand Down
4 changes: 3 additions & 1 deletion app/src/app_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ static inline int st_pthread_cond_signal(pthread_cond_t* cond) {
return pthread_cond_signal(cond);
}

static inline int st_open(const char* path, int flags) { return open(path, flags); }
static inline int st_open(const char* path, int flags) {
return open(path, flags);
}

static inline int st_open_mode(const char* path, int flags, mode_t mode) {
return open(path, flags, mode);
Expand Down
8 changes: 6 additions & 2 deletions app/src/rxtx_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ static void app_ptp_sync_notify(void* priv, struct mtl_ptp_sync_notify_meta* met
return;
}

void app_set_log_level(enum mtl_log_level level) { app_log_level = level; }
void app_set_log_level(enum mtl_log_level level) {
app_log_level = level;
}

enum mtl_log_level app_get_log_level(void) { return app_log_level; }
enum mtl_log_level app_get_log_level(void) {
return app_log_level;
}

static uint64_t app_ptp_from_tai_time(void* priv) {
struct st_app_context* ctx = priv;
Expand Down
4 changes: 3 additions & 1 deletion app/tools/convert_app_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ static inline void* conv_app_zmalloc(size_t sz) {
return p;
}

static inline void conv_app_free(void* p) { free(p); }
static inline void conv_app_free(void* p) {
free(p);
}

int conv_app_parse_args(struct conv_app_context* ctx, int argc, char** argv);

Expand Down
8 changes: 6 additions & 2 deletions app/v4l2_to_ip/v4l2_to_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,9 @@ static void video_init(struct device* dev) {
dev->type = (enum v4l2_buf_type) - 1;
}

static bool video_has_fd(struct device* dev) { return dev->fd != -1; }
static bool video_has_fd(struct device* dev) {
return dev->fd != -1;
}

static int video_open(struct device* dev, const char* devname) {
if (video_has_fd(dev)) {
Expand Down Expand Up @@ -765,7 +767,9 @@ static void video_close(struct device* dev) {
if (dev->opened) close(dev->fd);
}

static void video_log_status(struct device* dev) { ioctl(dev->fd, VIDIOC_LOG_STATUS); }
static void video_log_status(struct device* dev) {
ioctl(dev->fd, VIDIOC_LOG_STATUS);
}

static int video_get_format(struct device* dev) {
struct v4l2_format v_fmt;
Expand Down
Loading

0 comments on commit e69b2a7

Please sign in to comment.