Skip to content

Commit

Permalink
Merge pull request #26 from github/elr/refactor-spdxexp
Browse files Browse the repository at this point in the history
rename spdx package expression
  • Loading branch information
elrayle authored Dec 1, 2022
2 parents 1cab0d6 + e0d36d1 commit 82503af
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 29 deletions.
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.

0 comments on commit 82503af

Please sign in to comment.