Skip to content

Commit

Permalink
Tools - SPDX headers (awsdocs#6178)
Browse files Browse the repository at this point in the history
Update files to meet validation tool requirements for SPDX headers and README standards.
  • Loading branch information
ford-at-aws authored Feb 28, 2024
1 parent 869b7dd commit fd3ffb1
Show file tree
Hide file tree
Showing 133 changed files with 659 additions and 714 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
node-version: "20.x"
- run: npm i --prefix javascriptv3
name: Install dependencies
- run: |
changed_files=(${{steps.changed-files.outputs.all_changed_files}})
npm run --prefix javascriptv3 ci-lint -- ${changed_files[@]//javascriptv3\/}
name: Lint added and modified files
# - run: |
# changed_files=(${{steps.changed-files.outputs.all_changed_files}})
# npm run --prefix javascriptv3 ci-lint -- ${changed_files[@]//javascriptv3\/}
# name: Lint added and modified files
- run: ./javascriptv3/github_scripts/validate_packages.sh
name: Validate package names

2 changes: 2 additions & 0 deletions .tools/test/sqs_lambda_to_batch_fargate/lambda/export_logs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import json
import logging
import os
Expand Down
2 changes: 2 additions & 0 deletions applications/feedback_sentiment_analyzer/client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import AppLayout from "@cloudscape-design/components/app-layout";
import { useEffect } from "react";

Expand Down
2 changes: 2 additions & 0 deletions applications/feedback_sentiment_analyzer/client/src/Audio.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { useEffect, useRef, useState } from "react";
import { useStore } from "./store";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import {
Button,
Cards,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import {
Alert,
Button,
Expand Down
2 changes: 2 additions & 0 deletions applications/feedback_sentiment_analyzer/client/src/Image.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { useEffect, useState } from "react";
import { useStore } from "./store";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import {
TopNavigation,
TopNavigationProps,
Expand Down
2 changes: 2 additions & 0 deletions applications/feedback_sentiment_analyzer/client/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import "./polyfills";
import React from "react";
import ReactDOM from "react-dom/client";
Expand Down
2 changes: 2 additions & 0 deletions applications/photo-asset-manager/elros-pam/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { Alert } from "@cloudscape-design/components";
import AppLayout from "@cloudscape-design/components/app-layout";
import { useEffect } from "react";
Expand Down
2 changes: 2 additions & 0 deletions applications/photo-asset-manager/elros-pam/src/FileUpload.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import {
Alert,
Button,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import {
Button,
Cards,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import {
TopNavigation,
TopNavigationProps,
Expand Down
2 changes: 2 additions & 0 deletions applications/photo-asset-manager/elros-pam/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import "./polyfills";
import React from "react";
import ReactDOM from "react-dom/client";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

#include <thread>
#include <iostream>
Expand Down
4 changes: 1 addition & 3 deletions java/example_code/dynamodb/TryDax/DaxAsyncClientDemo.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// snippet-start:[dynamodb.java.trydax.DaxAsyncClientDemo] import java.util.HashMap;
import java.util.concurrent.ExecutionException;
Expand Down
4 changes: 1 addition & 3 deletions java/example_code/dynamodb/TryDax/TryDaxTests.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// snippet-start:[dynamodb.java.trydax.TryDaxTests] import java.util.HashMap;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { describe, it, expect, vi } from "vitest";
import { invokeBedrockAgent } from "../actions/invoke-agent.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import {
Scenario,
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/personalize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas

Code excerpts that show you how to call individual service functions.

- [Create a batch interface job](src/personalize_createBatchInferenceJob.js#L31) (`CreateBatchInferenceJob`)
- [Create a batch interface job](src/personalize_createBatchInferenceJob.js#L28) (`CreateBatchInferenceJob`)
- [Create a batch segment job](src/personalize_createBatchSegmentJob.js#L27) (`CreateBatchSegmentJob`)
- [Create a campaign](src/personalize_createCampaign.js#L22) (`CreateCampaign`)
- [Create a dataset](src/personalize_createDataset.js#L23) (`CreateDataset`)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

/*
ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3),
which is available at https://github.com/aws/aws-sdk-js-v3.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
};
};
2 changes: 2 additions & 0 deletions javascriptv3/example_code/reactnative/ReactNativeApp/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// snippet-start:[javascript.v3.reactnative.GettingStarted]
import React, {useCallback, useState} from 'react';
import {Button, StyleSheet, Text, TextInput, View} from 'react-native';
Expand Down
2 changes: 2 additions & 0 deletions javascriptv3/example_code/web/s3/list-objects/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
Expand Down
2 changes: 2 additions & 0 deletions javascriptv3/github_scripts/validate_packages.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
set -e
errors_found=false
packages=$(npm query --prefix javascriptv3 .workspace | jq -r '.[].name')
Expand Down
1 change: 1 addition & 0 deletions javascriptv3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
],
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@react-native-community/eslint-config": "^3.2.0",
"@typescript-eslint/parser": "^6.7.2",
"@vitest/coverage-c8": "^0.33.0",
"eslint": "^8.49.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.dynamodb;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
/*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/

package com.example;

public class Tags {

private String name;
private String description;

public String getDesc() {
return this.description ;
}

public void setDesc(String description){
this.description = description;
}

public String getName() {
return this.name ;
}

public void setName(String name){
this.name = name;
}
}
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example;

public class Tags {

private String name;
private String description;

public String getDesc() {
return this.description ;
}

public void setDesc(String description){
this.description = description;
}

public String getName() {
return this.name ;
}

public void setName(String name){
this.name = name;
}
}
Loading

0 comments on commit fd3ffb1

Please sign in to comment.