Commit graph

61 commits

Author SHA1 Message Date
d07b7e42b0
Merge pull request #24 from wneessen/dependabot/github_actions/sonarsource/sonarqube-scan-action-f885e52a7572cf7943f28637e75730227df2dbf2
Bump sonarsource/sonarqube-scan-action from 2af7c4bea3abd8c236b5edb80998f31374896f09 to f885e52a7572cf7943f28637e75730227df2dbf2
2024-09-20 09:14:49 +02:00
dependabot[bot]
8af84294dc
Bump sonarsource/sonarqube-scan-action
Bumps [sonarsource/sonarqube-scan-action](https://github.com/sonarsource/sonarqube-scan-action) from 2af7c4bea3abd8c236b5edb80998f31374896f09 to f885e52a7572cf7943f28637e75730227df2dbf2.
- [Release notes](https://github.com/sonarsource/sonarqube-scan-action/releases)
- [Commits](2af7c4bea3...f885e52a75)

---
updated-dependencies:
- dependency-name: sonarsource/sonarqube-scan-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-20 01:05:07 +00:00
1bdfdf8b56
Merge pull request #22 from wneessen/fix-21
Some checks failed
CodeQL / Analyze (push) Failing after 1s
golangci-lint / lint (push) Failing after 1s
Govulncheck Security Scan / test (push) Failing after 1s
REUSE Compliance Check / test (push) Failing after 1s
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1s
SonarQube / Build and analyze (push) Failing after 1s
Add SECURITY.md for reporting vulnerabilities
2024-09-16 10:05:55 +02:00
928939afef
Add SECURITY.md for reporting vulnerabilities
Created a SECURITY.md file detailing how to report possible vulnerabilities in the project. Includes contact information, response expectations, and instructions for sending encrypted reports using OpenPGP/GPG.
2024-09-16 10:05:28 +02:00
b9cb716230
Merge pull request #20 from wneessen/fix-18
Set permissions to read for workflow
2024-09-16 09:56:53 +02:00
b0b7b07a8a
Set permissions to read for workflow
Add 'contents: read' permissions to the GitHub Actions workflow configuration. This change enhances security by only allowing read access to the repository contents.
2024-09-16 09:56:04 +02:00
f2f653eeb6
Merge pull request #17 from wneessen/dependabot/github_actions/github/codeql-action-3.26.7
Some checks failed
CodeQL / Analyze (push) Failing after 23s
golangci-lint / lint (push) Failing after 2s
Govulncheck Security Scan / test (push) Failing after 2s
REUSE Compliance Check / test (push) Failing after 2s
Scorecard supply-chain security / Scorecard analysis (push) Failing after 2s
SonarQube / Build and analyze (push) Failing after 2s
Bump github/codeql-action from 3.26.6 to 3.26.7
2024-09-13 20:33:58 +02:00
7559b1e956
Merge pull request #12 from wneessen/dependabot/github_actions/fsfe/reuse-action-4.0.0
Bump fsfe/reuse-action from 1.3.0 to 4.0.0
2024-09-13 20:32:33 +02:00
dependabot[bot]
b1e14a709b
Bump github/codeql-action from 3.26.6 to 3.26.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.6 to 3.26.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3.26.6...8214744c546c1e5c8f03dde8fab3a7353211988d)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 18:32:22 +00:00
a74296b2d2
Merge pull request #13 from wneessen/dependabot/github_actions/codecov/codecov-action-4.5.0
Bump codecov/codecov-action from 3.1.6 to 4.5.0
2024-09-13 20:32:20 +02:00
7140fed74b
Merge pull request #14 from wneessen/dependabot/github_actions/golangci/golangci-lint-action-6.1.0
Bump golangci/golangci-lint-action from 3.7.0 to 6.1.0
2024-09-13 20:32:10 +02:00
2848da6c7b
Merge pull request #15 from wneessen/dependabot/github_actions/step-security/harden-runner-2.10.1
Bump step-security/harden-runner from 2.9.1 to 2.10.1
2024-09-13 20:31:59 +02:00
cb0ddc90ce
Merge pull request #16 from wneessen/dependabot/github_actions/actions/setup-go-5.0.2
Bump actions/setup-go from 4.1.0 to 5.0.2
2024-09-13 20:31:48 +02:00
8b2121841f
Add SPDX license headers to workflow files
Included appropriate SPDX headers to ensure clear licensing information in both CodeQL and Dependabot workflow files. This improves compliance and transparency across the repository.
2024-09-13 20:30:57 +02:00
dependabot[bot]
667b3b2bd4
Bump actions/setup-go from 4.1.0 to 5.0.2
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.1.0 to 5.0.2.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4.1.0...0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 18:29:07 +00:00
dependabot[bot]
40f53eb9b9
Bump step-security/harden-runner from 2.9.1 to 2.10.1
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.9.1 to 2.10.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/v2.9.1...91182cccc01eb5e619899d80e4e971d6181294a7)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 18:29:05 +00:00
dependabot[bot]
1dc4e10279
Bump golangci/golangci-lint-action from 3.7.0 to 6.1.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.7.0 to 6.1.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](3a91952989...aaa42aa062)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 18:29:02 +00:00
dependabot[bot]
e2b9383c6e
Bump codecov/codecov-action from 3.1.6 to 4.5.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.6 to 4.5.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](ab904c41d6...e28ff129e5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 18:28:59 +00:00
dependabot[bot]
9fb780b0a4
Bump fsfe/reuse-action from 1.3.0 to 4.0.0
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 1.3.0 to 4.0.0.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](28cf8f33bc...3ae3c6bdf1)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 18:28:57 +00:00
3205321d3d
Merge pull request #11 from step-security-bot/stepsecurity_remediation_1726251982
[StepSecurity] Apply security best practices
2024-09-13 20:28:18 +02:00
StepSecurity Bot
f4d7b6b9df
[StepSecurity] Apply security best practices
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2024-09-13 18:26:26 +00:00
34dd908590
Merge pull request #10 from wneessen/omitted
Some checks failed
Codecov workflow / run (push) Failing after 5s
golangci-lint / lint (push) Failing after 5s
Govulncheck Security Scan / test (push) Failing after 25s
REUSE Compliance Check / test (push) Failing after 3s
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1s
SonarQube / Build and analyze (push) Failing after 2s
Add omitted functionallity
2024-09-11 11:38:00 +02:00
68fe249669
Fix typo in Omitted method name
Corrected the spelling of the `Omitted` method to ensure consistency and avoid potential confusion. This change does not affect the functionality but improves code readability and accuracy.
2024-09-11 11:34:59 +02:00
754b2b90aa
Add test for omitted field
Introduce a new test, `TestVariable_Omitted`, to verify the behavior of the `NilBoolean` type fields, ensuring the correct handling of omitted and non-omitted fields during JSON unmarshalling.
2024-09-11 11:34:44 +02:00
7f2cf28053
Moved NewVariable to top
Moved NewVariable above the receiver methods
2024-09-11 11:26:58 +02:00
270111e53f
Reorder type declarations and JSON marshal/unmarshal methods
Moved type declarations for Nil* variables to the top for better readability and organization. JSON marshal and unmarshal methods have been repositioned towards the bottom of the file to keep related logic together.
2024-09-11 11:25:37 +02:00
61e2f10196
Refactor Variable type and add omitted status
Reorganized methods to ensure a logical method order and added the `present` field to track omitted values in JSON. This improves clarity and functionality by correctly indicating when a value was omitted.
2024-09-11 11:23:33 +02:00
ab766b23fa
Merge pull request #9 from wneessen/update-readme
Fix typo and improve readability in README.md
2024-09-11 11:08:30 +02:00
bc611894a8
Fix typo and improve readability in README.md
Corrected misspelling of 'niljson' and clarified punctuation. These changes enhance the clarity of sentences, ensuring better readability and comprehension for users.
2024-09-11 11:08:03 +02:00
7bddca99ae
Merge pull request #8 from wneessen/more-cleanup-cleanup
More code cleanup and security workflows
2024-09-11 11:00:07 +02:00
10d77340d5
Add security workflows for code analysis
This commit introduces three GitHub Actions workflows: `govulncheck`, `dependency-review`, and `scorecards`. These workflows enhance security by scanning for vulnerabilities, reviewing dependencies, and analyzing the supply-chain, respectively.
2024-09-11 10:58:53 +02:00
50877176f5
Simplify error reporting in niljson tests
Replaced t.Errorf with t.Error in niljson test cases for more concise error reporting. This change improves readability and maintains consistency across tests by using the simpler t.Error method.
2024-09-11 10:55:36 +02:00
d427f46eda
Merge pull request #7 from wneessen/more-cleanup
Refactor error messages in niljson tests.
2024-09-11 10:43:55 +02:00
0922c9d322
Refactor error messages in niljson tests.
Replaced hard-coded error strings with constant variables to improve code maintenance and readability. This ensures consistency across error messages and makes future updates easier.
2024-09-11 10:43:31 +02:00
c602cb5a96
Merge pull request #6 from wneessen/code-cleanup
Code cleanup
2024-09-11 10:32:10 +02:00
9584d3ec3c
Refactor error messages in niljson_test.go
Replaced hardcoded error strings with `ErrExpectedJSONInt` constant for consistency. This improves maintainability and readability of the test code by centralizing error message definitions.
2024-09-11 10:31:42 +02:00
98bcb37c50
Refactor error messages to use constants in tests
Added a new constant ErrExpectedJSONString for uniformity in error messages. Updated all relevant test cases to utilize this new constant instead of hardcoding the error message, enhancing code maintainability and readability.
2024-09-11 10:30:02 +02:00
296050ca70
Define error constants for JSON marshaling/unmarshaling tests
Introduced `ErrUnmarshalFailed` and `ErrMarshalFailed` constants to standardize error messages in JSON tests. This enhances code readability and maintainability by avoiding repeated strings directly in the test cases.
2024-09-11 10:27:55 +02:00
44cc717bc3
Merge pull request #5 from wneessen/fix-sonarqube
Fix Go version syntax in SonarQube workflow
2024-09-11 10:23:09 +02:00
926cfc9581
Fix Go version syntax in SonarQube workflow
Corrected the Go version syntax from '1.23.x' to '1.23' in the SonarQube GitHub Action workflow configuration to ensure proper version setup. This change addresses potential issues with version resolution in the setup-go action.
2024-09-11 10:22:51 +02:00
31d2bea9c6
Merge pull request #4 from wneessen/sonarqube-action
Add SonarQube integration for code analysis
2024-09-11 10:20:55 +02:00
e557e4caac
Add SonarQube integration for code analysis
Introduce a new SonarQube configuration to the project. This includes a GitHub action workflow for continuous integration on the main branch, setting up Go environment, running unit tests, and performing SonarQube analysis. This addition aims to ensure code quality and coverage are continuously monitored.
2024-09-11 10:19:00 +02:00
02d6e1f130
Merge pull request #3 from wneessen/marshalling
Some checks failed
Codecov workflow / run (push) Failing after 4s
golangci-lint / lint (push) Failing after 4s
REUSE Compliance Check / test (push) Failing after 3s
Add JSON marshaling support for Variable types
2024-09-02 12:19:23 +02:00
dee653ae88
Update README to include marshalling capability
Expanded the description and features to cover both marshalling and unmarshalling of JSON fields. This clarifies the package's functionality, making it clear that it handles not only null values during unmarshalling but also during marshalling.
2024-09-02 12:15:38 +02:00
05d806adff
Add JSON marshaling support for Variable types
Introduced a NewVariable function for creating generics-based Variable types. Added MarshalJSON methods to support JSON encoding for various Nil types, ensuring proper handling of nil values. Updated tests and examples to verify the new marshaling functionality.
2024-09-02 12:13:54 +02:00
25913bbf9f
Merge pull request #2 from wneessen/remove-redundant-get
Some checks failed
Codecov workflow / run (push) Failing after 3s
golangci-lint / lint (push) Failing after 3s
REUSE Compliance Check / test (push) Failing after 2s
Remove redundant Get() method
2024-09-01 21:17:50 +02:00
1150734ab0
Remove redundant Get() method
The Get() method was simply an alias for the Value() method and did not add any functionality. This simplification makes the code cleaner and reduces unnecessary duplication, improving maintainability.
2024-09-01 21:14:46 +02:00
b11f8257d8
Merge pull request #1 from wneessen/add_uint_tpes
Add uint types
2024-09-01 19:52:07 +02:00
89d0a3f00e
Add comprehensive nil type JSON unmarshal tests
This commit restructures and extends the JSON unmarshal tests for nil types to cover more data types, including boolean, byte slice, float32, float64, int, int64, string, and various unsigned integers. Each test ensures proper handling of value retrieval, nil checks, and reset behavior, enhancing the robustness of the unmarshal functionality.
2024-09-01 19:48:57 +02:00
63c28cbb9e
Add nullable unsigned integer types
Introduced new types: NilUInt, NilUInt8, NilUInt16, NilUInt32, and NilUInt64 to support nullable unsigned integers. This enhancement aligns with existing nullable types for better consistency and flexibility.
2024-09-01 19:24:45 +02:00