Skip to content

Commit ded2f2f

Browse files
committed
Add REUSE compatibility
- Follow the best practices of https://reuse.software/ to ensure BSD-3 licence is correctly applied. - Add a badge to README.md - Note: remove arm build as the CI pipeline is broken for this architecture
1 parent 1460d01 commit ded2f2f

19 files changed

+162
-29
lines changed

.github/workflows/reuse.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SPDX-FileCopyrightText: © 2024 Team CharLS
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
4+
name: REUSE Compliance Check
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
reuse-compliance-check:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: REUSE Compliance Check
16+
uses: fsfe/reuse-action@v5

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2017 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
16
# Changelog
27

38
All notable changes to this project are documented in this file.

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Team CharLS.
22
# SPDX-License-Identifier: BSD-3-Clause
33

4-
cmake_minimum_required(VERSION 3.16...3.30)
4+
cmake_minimum_required(VERSION 3.16...3.31)
55

66
# Extract the version info from version.h
77
file(READ "include/charls/version.h" version)

CharLS.sln.DotSettings

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
<s:Boolean x:Key="/Default/UserDictionary/Words/=nightshot/@EntryIndexedValue">True</s:Boolean>
9999
<s:Boolean x:Key="/Default/UserDictionary/Words/=NODISCARD/@EntryIndexedValue">True</s:Boolean>
100100
<s:Boolean x:Key="/Default/UserDictionary/Words/=NOLINTNEXTLINE/@EntryIndexedValue">True</s:Boolean>
101+
<s:Boolean x:Key="/Default/UserDictionary/Words/=optin/@EntryIndexedValue">True</s:Boolean>
101102
<s:Boolean x:Key="/Default/UserDictionary/Words/=opto/@EntryIndexedValue">True</s:Boolean>
102103
<s:Boolean x:Key="/Default/UserDictionary/Words/=oversized/@EntryIndexedValue">True</s:Boolean>
103104
<s:Boolean x:Key="/Default/UserDictionary/Words/=palettised/@EntryIndexedValue">True</s:Boolean>

Directory.Build.props

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<!--
2+
SPDX-FileCopyrightText: © 2017 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
26
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
37
<PropertyGroup>
48
<!-- Build to a folder outside the source folders, making it easier to clean. -->

LICENSES/BSD-3-Clause.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Copyright (c) <year> <owner>.
2+
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
5+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
7+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8+
9+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10+
11+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2014 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
15

26
<img src="https://raw.githubusercontent.com/team-charls/charls/main/doc/jpeg_ls_logo.png" alt="JPEG-LS Logo" width="100"/>
37

48
# CharLS
59

610
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://raw.githubusercontent.com/team-charls/charls/main/LICENSE.md)
11+
[![REUSE status](https://api.reuse.software/badge/github.com/team-charls/charls)](https://api.reuse.software/info/github.com/team-charls/charls)
712
[![Build status](https://ci.appveyor.com/api/projects/status/yq0naf3v2m8nfa8r/branch/main?svg=true)](https://ci.appveyor.com/project/vbaderks/charls/branch/main)
813
[![Build Status](https://dev.azure.com/team-charls/charls/_apis/build/status/team-charls.charls?branchName=main)](https://dev.azure.com/team-charls/charls/_build/latest?definitionId=2&branchName=main)
914
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=team-charls_charls&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=team-charls_charls)
@@ -43,7 +48,7 @@ The following JPEG-LS options are not supported by the CharLS implementation. Mo
4348

4449
#### Note about JPEG-LS part 2
4550

46-
After releasing the original baseline JPEG-LS standard ISO 14495-1:1999, ISO released an extension to the JPEG-LS standard called ISO/IEC 14495-2:2003: "Lossless and near-lossless compression of continuous-tone still images: Extensions". Currently CharLS doesn't support these extensions.
51+
After releasing the original baseline JPEG-LS standard ISO 14495-1:1999, ISO released an extension to the JPEG-LS standard called ISO/IEC 14495-2:2003: "Lossless and near-lossless compression of continuous-tone still images: Extensions". CharLS doesn't support this extension.
4752

4853
## Supported platforms
4954

@@ -61,7 +66,6 @@ The code is regularly compiled/tested on Windows and 64 bit Linux. Additionally,
6166
| MSVC | >= 2019 |
6267
| Apple Clang | >= 12 |
6368

64-
6569
## Getting Started
6670

6771
With [vcpkg](https://github.com/Microsoft/vcpkg) on Windows

REUSE.toml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SPDX-FileCopyrightText: © 2024 Team CharLS
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
4+
# This is a configuration file for the reuse lint tool. It allows specifing license info
5+
# for files that cannot be extended with such info.
6+
7+
version = 1
8+
9+
[[annotations]]
10+
path = [
11+
"**.jls",
12+
"**.bmp",
13+
"**.png",
14+
"**.pgm",
15+
"**.ppm",
16+
"**.raw",
17+
"**.vcxproj",
18+
"**.filters",
19+
"**.cd",
20+
"**.json",
21+
"**app.manifest",
22+
"spelling.dic",
23+
"default.ruleset",
24+
"src/charls.version",
25+
"CharLS.sln",
26+
"CharLS.sln.DotSettings",
27+
"test/MR2_UNC"
28+
]
29+
precedence = "aggregate"
30+
SPDX-FileCopyrightText = "© 2024 Team CharLS"
31+
SPDX-License-Identifier = "BSD-3-Clause"
32+
33+
[[annotations]]
34+
path = [
35+
"test/conformance/README.md",
36+
"test/conformance/*.jls",
37+
"test/conformance/*.pgm",
38+
"test/conformance/*.ppm",
39+
]
40+
precedence = "aggregate"
41+
SPDX-FileCopyrightText = "Copyright (c) Hewlett-Packard Company 1995-1999"
42+
SPDX-License-Identifier = "BSD-3-Clause"
43+

SECURITY.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2019 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
16
# Security Policy
27

38
## Supported Versions

appveyor.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: © 2015 Team CharLS
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
14
version: 2.1.1.{build}
25
os: Visual Studio 2019
36
configuration:

azure-pipelines.yml

-5
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,6 @@ jobs:
9595
Architecture: x86
9696
Shared: 'OFF'
9797

98-
ARM Release:
99-
BuildType: Release
100-
Architecture: x64_arm
101-
Shared: 'OFF'
102-
10398
ARM64 Release:
10499
BuildType: Release
105100
Architecture: x64_arm64

benchmark/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2022 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
16
# Benchmark
27

38
The Visual Studio project in this folder contains benchmarks to analyze different way of

default.ruleset.md

+32-18
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,42 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2018 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
16
# Comments on disabled Visual Studio C++ Core Guidelines Rules
27

3-
C26426: Global initializer calls a non-constexpr function 'xxx'
4-
-> Rationale: many false warnings. CharLS is a library, globals are correctly initialized.
8+
This document contains the rationales why some Microsoft
9+
C++ warnings are disabled in the file default.ruleset
10+
It is not possible to add this info to the .ruleset file itself as edit actions
11+
with the VS GUI would cause the comments to get lost.
12+
Most of disabled rules\warning are based on the C++ Core Guidelines that require
13+
usage of the gsl helper library.
14+
15+
## Warnings
16+
17+
- C26426: Global initializer calls a non-constexpr function 'xxx'
18+
**Rationale**: many false warnings. CharLS is a library, globals are correctly initialized.
519

6-
C26429: Symbol 'xxx' is never tested for nullness, it can be marked as not_null (f.23).
7-
-> Rationale: Prefast attributes are better.
20+
- C26429: Symbol 'xxx' is never tested for nullness, it can be marked as not_null (f.23).
21+
**Rationale**: Prefast attributes are better.
822

9-
C26446: Prefer to use gsl::at() instead of unchecked subscript operator.
10-
-> Rationale: CharLS require good performance, gsl:at() cannot be used. debug STL already checks.
23+
- C26446: Prefer to use gsl::at() instead of unchecked subscript operator.
24+
**Rationale**: CharLS require good performance, gsl:at() cannot be used. debug STL already checks.
1125

12-
C26459: You called an STL function '' with a raw pointer parameter. Consider wrapping your range in a gsl::span and pass as a span iterator (stl.1)
13-
Rationale: gsl:span() cannot be used. Update to std:span when available (C++20).
26+
- C26459: You called an STL function '' with a raw pointer parameter. Consider wrapping your range in a gsl::span and pass as a span iterator (stl.1)
27+
**Rationale**: gsl:span() cannot be used. Update to std:span when available (C++20).
1428

15-
C26472: Don't use static_cast for arithmetic conversions
16-
-> Rationale: can only be solved with gsl::narrow_cast
29+
- C26472: Don't use static_cast for arithmetic conversions
30+
**Rationale**: can only be solved with gsl::narrow_cast
1731

18-
C26481: Do not pass an array as a single pointer.
19-
-> Rationale: gsl::span is not available.
32+
- C26481: Do not pass an array as a single pointer.
33+
**Rationale**: gsl::span is not available.
2034

21-
C26482: Only index into arrays using constant expressions.
22-
-> Rationale: static analysis can verify access, std::array during runtime (debug)
35+
- C26482: Only index into arrays using constant expressions.
36+
**Rationale**: static analysis can verify access, std::array during runtime (debug)
2337

24-
C26490: Don't use reinterpret_cast
25-
-> Rationale: required to cast unsigned char\* to char\*.
38+
- C26490: Don't use reinterpret_cast
39+
**Rationale**: required to cast unsigned char\* to char\*.
2640

27-
C26494: Variable 'x' is uninitialized. Always initialize an object
28-
-> Rationale: many false warnings, other analyzers are better.
41+
- C26494: Variable 'x' is uninitialized. Always initialize an object
42+
**Rationale**: many false warnings, already covered with other analyzers.

doc/requirements.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2020 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
16
# Style and Design
27

38
## Introduction

doc/style_and_design.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2014 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
16
# Style and Design
27

38
## Introduction

fuzzing/libfuzzer/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2023 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
16
# Instructions to fuzz CharLS with LibFuzzer
27

38
- It is in general recommended to fuzz the release builds.

samples/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2021 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
16
The C/C++ samples applications are created for simplicity and to demonstrate
27
how the use the CharLS API. They are not production quality. In particular they
3-
should not be installed in binary distribution as reference command line utils
8+
should not be installed in binary distribution as reference command line utils.

src/charls-template.pc

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: © 2020 Team CharLS
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
14
prefix=@CMAKE_INSTALL_PREFIX@
25
exec_prefix=${prefix}
36
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@

unittest/CodeCoverage.runsettings

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<!--
2+
SPDX-FileCopyrightText: © 2023 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
26
<RunSettings>
37
<DataCollectionRunSettings>
48
<DataCollectors>

0 commit comments

Comments
 (0)