Skip to content

Commit

Permalink
internal/mod/modfile: add copyright message
Browse files Browse the repository at this point in the history
As suggested in https://cuelang.org/cl/1168707 and not done before
it landed.

Signed-off-by: Roger Peppe <[email protected]>
Change-Id: Ib412b2646a694a417c54511fcabee1703b5b7852
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1171838
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
rogpeppe authored and mvdan committed Nov 8, 2023
1 parent ca20656 commit f9c8d98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/mod/modfile/modfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ langugage: version: "v0.4.3"
module: "foo.com/bar@v0"
`,
wantError: `langugage: field not allowed:
cuelang.org/go/internal/mod/modfile/schema.cue:14:8
cuelang.org/go/internal/mod/modfile/schema.cue:16:2
cuelang.org/go/internal/mod/modfile/schema.cue:28:8
cuelang.org/go/internal/mod/modfile/schema.cue:30:2
module.cue:2:1`,
}, {
testName: "InvalidLanguageVersion",
Expand Down
14 changes: 14 additions & 0 deletions internal/mod/modfile/schema.cue
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2023 CUE Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// This schema constrains a module.cue file. This form constrains module.cue files
// outside of the main module. For the module.cue file in a main module, the schema
// is less restrictive, because wherever #Semver is used, a less specific version may be
Expand Down

0 comments on commit f9c8d98

Please sign in to comment.