Skip to content

Commit ad833d0

Browse files
committed
Add SPDX header and commentary tests for autoloads
1 parent 48d0a97 commit ad833d0

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

ai-code-autoloads.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
;;; ai-code-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*-
1+
;;; ai-code-autoloads.el --- Generated autoloads for AI Code -*- lexical-binding: t; -*-
2+
;; SPDX-License-Identifier: Apache-2.0
23
;; Generated by the `loaddefs-generate' function.
34

4-
;; This file is part of GNU Emacs.
5+
;;; Commentary:
6+
;; Generated autoload definitions for the AI Code package.
57

68
;;; Code:
79

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
;;; test_ai-code-package-hygiene.el --- Package metadata hygiene tests -*- lexical-binding: t; -*-
2+
3+
;; SPDX-License-Identifier: Apache-2.0
4+
5+
;;; Commentary:
6+
;; Regression tests for package metadata that CI packaging checks rely on.
7+
8+
;;; Code:
9+
10+
(require 'ert)
11+
12+
(defun ai-code-test--file-prefix (path length)
13+
"Return the first LENGTH characters from PATH."
14+
(with-temp-buffer
15+
(insert-file-contents path nil 0 length)
16+
(buffer-string)))
17+
18+
(ert-deftest ai-code-test-autoloads-file-has-spdx-header ()
19+
"Autoloads file should advertise the package license with SPDX."
20+
(let ((header (ai-code-test--file-prefix "ai-code-autoloads.el" 400)))
21+
(should (string-match-p "SPDX-License-Identifier: Apache-2\\.0" header))))
22+
23+
(ert-deftest ai-code-test-autoloads-file-has-commentary-section ()
24+
"Autoloads file should include a Commentary section for package checks."
25+
(let ((header (ai-code-test--file-prefix "ai-code-autoloads.el" 400)))
26+
(should (string-match-p "^;;; Commentary:" header))))
27+
28+
(provide 'test_ai-code-package-hygiene)
29+
30+
;;; test_ai-code-package-hygiene.el ends here

0 commit comments

Comments
 (0)