Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/typo_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
#

name: typo check
on:
pull_request:
branches:
- master

jobs:
typo-check:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# To run the typo check locally, you can follow these steps:
# 1. Install typos locally using cargo:
# cargo install typos-cli
# 2. Run the typo check with the following command:
# typos
- name: Check typos
uses: crate-ci/typos@master
24 changes: 24 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
#

[default.extend-words]
"fo" = "fo"
"VERTX" = "VERTX"
"Vertx" = "Vertx"
"vertx" = "vertx"
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ private static void testValidatorAddFail(RestOperations template, String cseUrlP
isExcep = true;
TestMgr.check(400, e.getStatus().getStatusCode());
TestMgr.check(Status.BAD_REQUEST, e.getReasonPhrase());
// Message dependends on locale, so just check the short part.
// Message depended on locale, so just check the short part.
// 'must be greater than or equal to 20', propertyPath=add.arg1, rootBeanClass=class org.apache.servicecomb.demo.jaxrs.server.Validator, messageTemplate='{jakarta.validation.constraints.Min.message}'}]]
// ignored
if (e.getErrorData() instanceof CommonExceptionData) {
Expand Down Expand Up @@ -426,7 +426,7 @@ private static void testValidatorSayHiFail(RestOperations template, String cseUr
isExcep = true;
TestMgr.check(400, e.getStatus().getStatusCode());
TestMgr.check(Status.BAD_REQUEST, e.getReasonPhrase());
// Message dependends on locale, so just check the short part.
// Message depended on locale, so just check the short part.
if (e.getErrorData() instanceof CommonExceptionData) {
// highway decode/encode 'Object' with special type information, got runtime type
CommonExceptionData data = (CommonExceptionData) e.getErrorData();
Expand Down Expand Up @@ -468,7 +468,7 @@ private static void testValidatorExchangeFail(RestOperations template, String cs
isExcep = true;
TestMgr.check(400, e.getStatus().getStatusCode());
TestMgr.check(Status.BAD_REQUEST, e.getReasonPhrase());
// Message dependends on locale, so just check the short part.
// Message depended on locale, so just check the short part.
if (e.getErrorData() instanceof CommonExceptionData) {
// highway decode/encode 'Object' with special type information, got runtime type
CommonExceptionData data = (CommonExceptionData) e.getErrorData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ private void testDateTimeSchema() {
private void testDateTimeSchemaMulticast() throws Exception {
DiscoveryContext context = new DiscoveryContext();
VersionedCache serversVersionedCache = discoveryTree.discovery(context, "springmvctest", "springmvc");
List<String> enpoints = serversVersionedCache.data();
List<String> endpoints = serversVersionedCache.data();

for (String endpoint : enpoints) {
for (String endpoint : endpoints) {
InvocationContext invocationContext = new InvocationContext();
invocationContext.addLocalContext(LoadBalanceFilter.SERVICECOMB_SERVER_ENDPOINT, endpoint);
Date date = new Date();
Expand All @@ -155,11 +155,11 @@ private Endpoint parseEndpoint(String endpointUri) throws Exception {
private void testDateTimeSchemaMulticastRestTemplate() throws Exception {
DiscoveryContext context = new DiscoveryContext();
VersionedCache serversVersionedCache = discoveryTree.discovery(context, "springmvctest", "springmvc");
List<String> enpoints = serversVersionedCache.data();
List<String> endpoints = serversVersionedCache.data();

RestOperations restTemplate = RestTemplateBuilder.create();

for (String endpoint : enpoints) {
for (String endpoint : endpoints) {
CseHttpEntity<?> entity = new CseHttpEntity<>(null);
InvocationContext invocationContext = new InvocationContext();
invocationContext.addLocalContext(LoadBalanceFilter.SERVICECOMB_SERVER_ENDPOINT, endpoint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ public void testAllTransport() throws Exception {

testGenericsModel();

testSpecailNameModel();
testSpecialNameModel();
}

private void testSpecailNameModel() {
private void testSpecialNameModel() {
SpecialNameModel model = new SpecialNameModel();
model.setaIntName(30);
SpecialNameModel result = specialNameModelInf.specialNameModel(0, model);
Expand Down
Loading