Skip to content

Commit d9214b0

Browse files
committed
add license headers to cursor rules and accompanying rule
1 parent 72755fe commit d9214b0

4 files changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
// Copyright 2022-2025 Salesforce, Inc.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
20+
---
21+
22+
Whenever created a new file in this project you must include the license header at the top of the file.
23+
Whenever reading files you should ignore the license header.
24+
25+
License header to add to new files:
26+
```
27+
// Copyright 2022-2025 Salesforce, Inc.
28+
//
29+
// Licensed under the Apache License, Version 2.0 (the "License");
30+
// you may not use this file except in compliance with the License.
31+
// You may obtain a copy of the License at
32+
//
33+
// http://www.apache.org/licenses/LICENSE-2.0
34+
//
35+
// Unless required by applicable law or agreed to in writing, software
36+
// distributed under the License is distributed on an "AS IS" BASIS,
37+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38+
// See the License for the specific language governing permissions and
39+
// limitations under the License.
40+
```

.cursor/rules/always-recommend-test-updates.mdc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ description:
33
globs: *.go
44
alwaysApply: false
55
---
6+
// Copyright 2022-2025 Salesforce, Inc.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
20+
---
21+
622
After modifying any Go file:
723
1. Check for a corresponding _test.go file in the same directory
824
2. If found, inspect the test file to identify test cases related to your changes

.cursor/rules/cleanup-after-changes.mdc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ description:
33
globs:
44
alwaysApply: true
55
---
6+
// Copyright 2022-2025 Salesforce, Inc.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
20+
---
21+
622
After modifying any file:
723
1. Use grep and/or search project index for the old feature name/variable names that were replaced
824
2. Check for references in documentation, comments, and test files

.cursor/rules/explicit-backward-compatibility.mdc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ description:
33
globs:
44
alwaysApply: true
55
---
6+
// Copyright 2022-2025 Salesforce, Inc.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
20+
---
21+
622
When modifying code, follow these guidelines for backward compatibility:
723

824
1. **Remove unused code by default** - If code was added in the current PR and is unused, it should be removed entirely.

0 commit comments

Comments
 (0)