Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename spdx package expression #26

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Contributing

[fork]: https://github.com/github/spdx-expression/fork
[pr]: https://github.com/github/spdx-expression/compare
[style]: https://github.com/github/spdx-expression/blob/main/.golangci.yaml
[fork]: https://github.com/github/go-spdx
[pr]: https://github.com/github/go-spdx/compare
[style]: https://github.com/github/go-spdx/blob/main/.golangci.yaml
[code-of-conduct]: CODE_OF_CONDUCT.md

Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# spdx-expression
# go-spdx

Golang implementation of a checker for determining if a set of SPDX IDs satisfies an SPDX Expression.

Expand Down
6 changes: 3 additions & 3 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## How to file issues and get help

This project uses GitHub [issues](https://github.com/github/spdx-expression/issues) to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. If not found, file your bug or feaure request as a new issue.
This project uses GitHub [issues](https://github.com/github/go-spdx/issues) to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. If not found, file your bug or feaure request as a new issue.

For help or questions about using this project, please see the project [Discussions](https://github.com/github/spdx-expression/discussions) where you can ask a question in [Q&A](https://github.com/github/spdx-expression/discussions/categories/q-a), propose an idea in [Ideas](https://github.com/github/spdx-expression/discussions/categories/ideas), or share your work in [Show and Tell](https://github.com/github/spdx-expression/discussions/categories/show-and-tell).
For help or questions about using this project, please see the project [Discussions](https://github.com/github/go-spdx/discussions) where you can ask a question in [Q&A](https://github.com/github/go-spdx/discussions/categories/q-a), propose an idea in [Ideas](https://github.com/github/go-spdx/discussions/categories/ideas), or share your work in [Show and Tell](https://github.com/github/go-spdx/discussions/categories/show-and-tell).

The spdx-expression package is under active development and maintained by GitHub staff. Community [contributions](./CONTRIBUTING.md) are always welcome. We will do our best to respond to issues, feature requests, and community questions in a timely manner.
The go-spdx package is under active development and maintained by GitHub staff. Community [contributions](./CONTRIBUTING.md) are always welcome. We will do our best to respond to issues, feature requests, and community questions in a timely manner.

Support for this project is limited to the resources listed above.
2 changes: 1 addition & 1 deletion spdxexp/compare.go → expression/compare.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

func compareGT(first *node, second *node) bool {
if !first.isLicense() || !second.isLicense() {
Expand Down
2 changes: 1 addition & 1 deletion spdxexp/compare_test.go → expression/compare_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

import (
"testing"
Expand Down
7 changes: 7 additions & 0 deletions expression/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
Expression package validates licenses and determines if a license expression is satisfied by a list of licenses.
Validity of a license is determined by the [SPDX license list].

[SPDX license list]: https://spdx.org/licenses/
*/
package expression
2 changes: 1 addition & 1 deletion spdxexp/license.go → expression/license.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

import (
"strings"
Expand Down
2 changes: 1 addition & 1 deletion spdxexp/license_test.go → expression/license_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion spdxexp/node.go → expression/node.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

import (
"sort"
Expand Down
2 changes: 1 addition & 1 deletion spdxexp/node_test.go → expression/node_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion spdxexp/parse.go → expression/parse.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion spdxexp/parse_test.go → expression/parse_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion spdxexp/satisfies.go → expression/satisfies.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

import (
"errors"
Expand Down
4 changes: 2 additions & 2 deletions spdxexp/satisfies_test.go → expression/satisfies_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

import (
"errors"
Expand Down Expand Up @@ -31,7 +31,7 @@ func TestValidateLicenses(t *testing.T) {

// TestSatisfiesSingle lets you quickly test a single call to Satisfies with a specific license expression and allowed list of licenses.
// To test a different expression, change the expression, allowed licenses, and expected result in the function body.
// TO RUN: go test ./spdxexp -run TestSatisfiesSingle
// TO RUN: go test ./expression -run TestSatisfiesSingle
func TestSatisfiesSingle(t *testing.T) {
// Update these to test a different expression.
expression := "BSD-3-Clause AND GPL-2.0"
Expand Down
2 changes: 1 addition & 1 deletion spdxexp/scan.go → expression/scan.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

/* Translation to Go from javascript code: https://github.com/clearlydefined/spdx-expression-parse.js/blob/master/scan.js */

Expand Down
2 changes: 1 addition & 1 deletion spdxexp/scan_test.go → expression/scan_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion spdxexp/test_helper.go → expression/test_helper.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package spdxexp
package expression

// getLicenseNode is a test helper method that is expected to create a valid
// license node. Use this function when the test data is known to be a valid
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/github/spdx-expression
module github.com/github/go-spdx

go 1.18

Expand Down
7 changes: 0 additions & 7 deletions spdxexp/doc.go

This file was deleted.