Skip to content

Commit

Permalink
dev(license-headers): fix excludes list
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelDeimos committed Jul 10, 2024
1 parent 2bf9f60 commit 6728dd2
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 7 deletions.
19 changes: 19 additions & 0 deletions experiments/x86emu/www/js/Instance.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2024 Puter Technologies Inc.
*
* This file is part of Puter.
*
* Puter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import { V86 } from "./V86Wrapper.mjs";
/**
* Class representing an Instance of an emulator machine.
Expand Down
19 changes: 19 additions & 0 deletions experiments/x86emu/www/js/InstanceManager.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2024 Puter Technologies Inc.
*
* This file is part of Puter.
*
* Puter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import Instance from "./Instance.mjs"

/**
Expand Down
19 changes: 19 additions & 0 deletions experiments/x86emu/www/js/V86Wrapper.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2024 Puter Technologies Inc.
*
* This file is part of Puter.
*
* Puter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

let V86;

if (typeof window !== 'undefined') {
Expand Down
19 changes: 19 additions & 0 deletions experiments/x86emu/www/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2024 Puter Technologies Inc.
*
* This file is part of Puter.
*
* Puter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#!/usr/bin/env node
/*
* Copyright (C) 2024 Puter Technologies Inc.
Expand Down
19 changes: 19 additions & 0 deletions src/backend/src/services/ParameterService.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2024 Puter Technologies Inc.
*
* This file is part of Puter.
*
* Puter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const BaseService = require("./BaseService");

/*
Expand Down
19 changes: 19 additions & 0 deletions src/backend/src/services/information/InformationService.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2024 Puter Technologies Inc.
*
* This file is part of Puter.
*
* Puter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const BaseService = require("../BaseService");

/*
Expand Down
21 changes: 20 additions & 1 deletion tools/comment-parser/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2024 Puter Technologies Inc.
*
* This file is part of Puter.
*
* Puter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const lib = {};
lib.dedent_lines = lines => {
// If any lines are just spaces, remove the spaces
Expand Down Expand Up @@ -311,7 +330,7 @@ const CommentParser = () => {
break;
}
}
console.log('comment?', comment);
// console.log('comment?', comment);
if ( ! comment ) break;
results.push(comment);
}
Expand Down
19 changes: 19 additions & 0 deletions tools/comment-parser/test/test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2024 Puter Technologies Inc.
*
* This file is part of Puter.
*
* Puter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const {
StringStream,
LinesCommentParser,
Expand Down
7 changes: 6 additions & 1 deletion tools/file-walker/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ const EXCLUDE_LISTS = {
/^src\/dev-center\/js/,
/src\/backend\/src\/public\/assets/,
/^src\/gui\/src\/lib/,
/^src\/puter\.js/,
/^eslint\.config\.js$/,
]
};

EXCLUDE_LISTS.NOT_AGPL = [
...EXCLUDE_LISTS.NOT_SOURCE,
/^src\/puter-js/,
];

const hl_readdir = async path => {
const names = await fs.promises.readdir(path);
const entries = [];
Expand Down
10 changes: 5 additions & 5 deletions tools/license-headers/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const LicenseChecker = ({
}
}

console.log('headers', headers);
// console.log('headers', headers);

const combined = headers_lines.slice(top, bottom).flat();
const combined_txt = combined.join('\n');
Expand Down Expand Up @@ -165,7 +165,7 @@ const license_check_test = async ({ options }) => {
});

const walk_iterator = walk({
excludes: EXCLUDE_LISTS.NOT_SOURCE,
excludes: EXCLUDE_LISTS.NOT_AGPL,
}, path_.join(__dirname, '../..'));
for await ( const value of walk_iterator ) {
if ( value.is_dir ) continue;
Expand Down Expand Up @@ -216,7 +216,7 @@ const cmd_check_fn = async () => {
};

const walk_iterator = walk({
excludes: EXCLUDE_LISTS.NOT_SOURCE,
excludes: EXCLUDE_LISTS.NOT_AGPL,
}, path_.join(__dirname, '../..'));
for await ( const value of walk_iterator ) {
if ( value.is_dir ) continue;
Expand Down Expand Up @@ -355,7 +355,7 @@ const cmd_sync_fn = async () => {
};

const walk_iterator = walk({
excludes: EXCLUDE_LISTS.NOT_SOURCE,
excludes: EXCLUDE_LISTS.NOT_AGPL,
}, '.');
for await ( const value of walk_iterator ) {
if ( value.is_dir ) continue;
Expand All @@ -378,7 +378,7 @@ const cmd_sync_fn = async () => {
continue;
}
if ( ! diff_info.has_header ) {
if ( false ) fs.writeFileSync(
fs.writeFileSync(
value.path,
comment_parser.output_comment({
style: 'block',
Expand Down

0 comments on commit 6728dd2

Please sign in to comment.