Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #3003

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/bin/auto-close-inactive-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ function usage(){
echo " : example: --github-project-path Orange-OpenSource/hurl"
echo
echo " --github-token <github token access> #mandatory"
echo " specify github user token with acces to PR api"
echo " specify github user token with access to PR api"
echo " : example: --github-token ghp_kJvDuaalZidk3nB1uYtgsqMrkQ5Hkh76jh2o"
echo
echo " --max-days-of-inactivity <days> #optional"
echo " maximium days of inactivity before closing a PR"
echo " maximum days of inactivity before closing a PR"
echo " : default value: 30"
echo " : example for a month: 7"
echo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bin/check_release_assets_sha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function usage(){
echo " : example: orange-opensource/hurl"
echo
echo " --github-token <github token access> #mandatory"
echo " specify github user token with acces to PR api"
echo " specify github user token with access to PR api"
echo " : example: --github-token ghp_kJvDuaalZtyhinB1uYtgsqMrkQ5Hkh76jh2o"
echo
}
Expand Down Expand Up @@ -123,7 +123,7 @@ function is_release(){
if [[ $gh_exit_code -eq 0 ]] ; then
echo "${release} is a release in ${github_repo}"
else
log_error "release informations" "${release} release does not exist in ${github_repo}"
log_error "release information" "${release} release does not exist in ${github_repo}"
return 1
fi
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bin/shared.functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function github_get_latest_release(){
log_error "${FUNCNAME[0]}" "$(head -1 <<< "${result}")"
return 1
else
latest=$(echo "$result" | grep Lates | cut --field 3)
latest=$(echo "$result" | grep Latest | cut --field 3)
if [[ -z $latest ]] ; then
log_error "Latest version" "Action $project_path does not have any release tagged as latest, please check this repo"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bin/update_workflow_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function usage(){
echo " : example: --dry"
echo
echo " --github-token <github token access> #mandatory"
echo " specify github user token with acces to PR api"
echo " specify github user token with access to PR api"
echo " : example: --github-token ghp_kJvDuaalZtyhinB1uYtgsqMrkQ5Hkh76jh2o"
echo
}
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/update-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.HURL_BOT_TOKEN }}
REPO: ${{ github.repository }}
BOT_UPDATE_BRANCHE_NAME: "bot/update-actions"
BOT_UPDATE_BRANCH_NAME: "bot/update-actions"
name: update-actions
runs-on: ubuntu-latest
steps:
Expand All @@ -40,7 +40,7 @@ jobs:

- name: Get actual pull request id
run: |
ACTUAL_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCHE_NAME}" --state "open" --json number --jq .[].number)
ACTUAL_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCH_NAME}" --state "open" --json number --jq .[].number)
ACTUAL_PR_NUMBER=${ACTUAL_PR_NUMBER:-0}
echo "ACTUAL_PR_NUMBER=${ACTUAL_PR_NUMBER}" | tee -a "${GITHUB_ENV}"
if [ ${ACTUAL_PR_NUMBER} -eq 0 ] ; then
Expand Down Expand Up @@ -80,30 +80,30 @@ jobs:
- name: Push updates to branch
if: env.UPDATED_ACTIONS_COUNT != 0
run: |
git checkout -b "${BOT_UPDATE_BRANCHE_NAME}"
git checkout -b "${BOT_UPDATE_BRANCH_NAME}"
git commit -am "Update actions"
git push --set-upstream origin "${BOT_UPDATE_BRANCHE_NAME}" && git_exit_code=0 || git_exit_code=$?
git push --set-upstream origin "${BOT_UPDATE_BRANCH_NAME}" && git_exit_code=0 || git_exit_code=$?
if [ ${git_exit_code} -eq 0 ] ; then
echo " - ✅ push actions update to ${BOT_UPDATE_BRANCHE_NAME} succeeds."
echo " - ✅ push actions update to ${BOT_UPDATE_BRANCH_NAME} succeeds."
else
echo " - ❌ A problem occurs when attempting to push actions update to origin/${BOT_UPDATE_BRANCHE_NAME}."
echo " - ❌ A problem occurs when attempting to push actions update to origin/${BOT_UPDATE_BRANCH_NAME}."
exit 1
fi
branch_exists=$(git ls-remote | (grep -c "${BOT_UPDATE_BRANCHE_NAME}" || true))
branch_exists=$(git ls-remote | (grep -c "${BOT_UPDATE_BRANCH_NAME}" || true))
if [ ${branch_exists} -eq 1 ] ; then
echo " - ✅ The origin/${BOT_UPDATE_BRANCHE_NAME} now branch exists on remote."
echo " - ✅ The origin/${BOT_UPDATE_BRANCH_NAME} now branch exists on remote."
else
echo " - ❌ Git push command succeeds but origin/${BOT_UPDATE_BRANCHE_NAME} still does not exist on remote."
echo " - ❌ Git push command succeeds but origin/${BOT_UPDATE_BRANCH_NAME} still does not exist on remote."
exit 1
fi

- name: Create new pull request
if: env.UPDATED_ACTIONS_COUNT != 0
run: |
GITHUB_TOKEN=${{ secrets.HURL_BOT_TOKEN }}
gh pr create --fill --base master --head "${BOT_UPDATE_BRANCHE_NAME}" && gh_exit_code=0 || gh_exit_code=$?
gh pr create --fill --base master --head "${BOT_UPDATE_BRANCH_NAME}" && gh_exit_code=0 || gh_exit_code=$?
if [ ${gh_exit_code} -eq 0 ] ; then
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCHE_NAME}" --state "open" --json number --jq .[].number)
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCH_NAME}" --state "open" --json number --jq .[].number)
echo " - ✅ Creation of pull request n°${NEW_PR_NUMBER} succeeds."
else
echo " - ❌ A problem occurs when attempting to create new pull request."
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/update-branch-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Init bot branch name
run: |
base=$(echo "${{ github.ref }}" | sed "s#refs/heads/##g" | tr '/' '-')
echo "BOT_UPDATE_VERSION_BRANCHE_NAME=bot/update-branch-version-${base}" | tee -a $GITHUB_ENV
echo "BOT_UPDATE_VERSION_BRANCH_NAME=bot/update-branch-version-${base}" | tee -a $GITHUB_ENV

- name: Update version
run: |
Expand Down Expand Up @@ -102,13 +102,13 @@ jobs:

- name: Push commits
run: |
git checkout -b "${BOT_UPDATE_VERSION_BRANCHE_NAME}"
git checkout -b "${BOT_UPDATE_VERSION_BRANCH_NAME}"
git commit -am "Update hurl version to ${{ inputs.new_version }}"
git push --set-upstream origin "${BOT_UPDATE_VERSION_BRANCHE_NAME}" && git_exit_code=0 || git_exit_code=$?
git push --set-upstream origin "${BOT_UPDATE_VERSION_BRANCH_NAME}" && git_exit_code=0 || git_exit_code=$?
if [ ${git_exit_code} -eq 0 ] ; then
echo " - ✅ commits pushed to ${BOT_UPDATE_VERSION_BRANCHE_NAME} branch."
echo " - ✅ commits pushed to ${BOT_UPDATE_VERSION_BRANCH_NAME} branch."
else
echo " - ❌ A problem occurs when attempting to push create release commits to ${BOT_UPDATE_VERSION_BRANCHE_NAME} branch."
echo " - ❌ A problem occurs when attempting to push create release commits to ${BOT_UPDATE_VERSION_BRANCH_NAME} branch."
exit 1
fi

Expand All @@ -118,9 +118,9 @@ jobs:
GITHUB_TOKEN=${{ secrets.HURL_BOT_TOKEN }}
git fetch
base=$(echo "${{ github.ref }}" | sed "s#refs/heads/##g")
gh pr create --fill --label bot --base "${base}" --head "${BOT_UPDATE_VERSION_BRANCHE_NAME}" && gh_exit_code=0 || gh_exit_code=$?
gh pr create --fill --label bot --base "${base}" --head "${BOT_UPDATE_VERSION_BRANCH_NAME}" && gh_exit_code=0 || gh_exit_code=$?
if [ ${gh_exit_code} -eq 0 ] ; then
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_VERSION_BRANCHE_NAME}" --state "open" --json number --jq .[].number)
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_VERSION_BRANCH_NAME}" --state "open" --json number --jq .[].number)
echo " - ✅ Creation of pull request n°${NEW_PR_NUMBER} succeeds."
echo "pr_number=${NEW_PR_NUMBER}" | tee -a $GITHUB_OUTPUT
else
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/update-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.HURL_BOT_TOKEN }}
REPO: ${{ github.repository }}
BOT_UPDATE_BRANCHE_NAME: "bot/update-crates"
BOT_UPDATE_BRANCH_NAME: "bot/update-crates"
name: update-crates
runs-on: ubuntu-latest
steps:
Expand All @@ -39,7 +39,7 @@ jobs:

- name: Get actual pull request id
run: |
ACTUAL_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCHE_NAME}" --state "open" --json number --jq .[].number)
ACTUAL_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCH_NAME}" --state "open" --json number --jq .[].number)
ACTUAL_PR_NUMBER=${ACTUAL_PR_NUMBER:-0}
echo "ACTUAL_PR_NUMBER=${ACTUAL_PR_NUMBER}" | tee -a "${GITHUB_ENV}"
if [ ${ACTUAL_PR_NUMBER} -eq 0 ] ; then
Expand Down Expand Up @@ -79,30 +79,30 @@ jobs:
- name: Push updates to branch
if: env.UPDATED_CRATES_COUNT != 0
run: |
git checkout -b "${BOT_UPDATE_BRANCHE_NAME}"
git checkout -b "${BOT_UPDATE_BRANCH_NAME}"
git commit -am "Update crates"
git push --set-upstream origin "${BOT_UPDATE_BRANCHE_NAME}" && git_exit_code=0 || git_exit_code=$?
git push --set-upstream origin "${BOT_UPDATE_BRANCH_NAME}" && git_exit_code=0 || git_exit_code=$?
if [ ${git_exit_code} -eq 0 ] ; then
echo " - ✅ push crates update to ${BOT_UPDATE_BRANCHE_NAME} succeeds."
echo " - ✅ push crates update to ${BOT_UPDATE_BRANCH_NAME} succeeds."
else
echo " - ❌ A problem occurs when attempting to push crates update to origin/${BOT_UPDATE_BRANCHE_NAME}."
echo " - ❌ A problem occurs when attempting to push crates update to origin/${BOT_UPDATE_BRANCH_NAME}."
exit 1
fi
branch_exists=$(git ls-remote | (grep -c "${BOT_UPDATE_BRANCHE_NAME}" || true))
branch_exists=$(git ls-remote | (grep -c "${BOT_UPDATE_BRANCH_NAME}" || true))
if [ ${branch_exists} -eq 1 ] ; then
echo " - ✅ The origin/${BOT_UPDATE_BRANCHE_NAME} now branch exists on remote."
echo " - ✅ The origin/${BOT_UPDATE_BRANCH_NAME} now branch exists on remote."
else
echo " - ❌ Git push command succeeds but origin/${BOT_UPDATE_BRANCHE_NAME} still does not exist on remote."
echo " - ❌ Git push command succeeds but origin/${BOT_UPDATE_BRANCH_NAME} still does not exist on remote."
exit 1
fi

- name: Create new pull request
if: env.UPDATED_CRATES_COUNT != 0
run: |
GITHUB_TOKEN=${{ secrets.HURL_BOT_TOKEN }}
gh pr create --fill --base master --head "${BOT_UPDATE_BRANCHE_NAME}" && gh_exit_code=0 || gh_exit_code=$?
gh pr create --fill --base master --head "${BOT_UPDATE_BRANCH_NAME}" && gh_exit_code=0 || gh_exit_code=$?
if [ ${gh_exit_code} -eq 0 ] ; then
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCHE_NAME}" --state "open" --json number --jq .[].number)
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCH_NAME}" --state "open" --json number --jq .[].number)
echo " - ✅ Creation of pull request n°${NEW_PR_NUMBER} succeeds."
else
echo " - ❌ A problem occurs when attempting to create new pull request."
Expand Down
2 changes: 1 addition & 1 deletion integration/hurl/tests_failed/streaming.hurl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# With a streaming endpoint,
# Hurl is hanging without outputing anything
# Hurl is hanging without outputting anything
#
# curl outputs when it received data
# $ curl http://localhost:8000/streaming
Expand Down
2 changes: 1 addition & 1 deletion packages/hurl/src/cli/options/matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub fn include(arg_matches: &ArgMatches) -> bool {
}

/// Returns true if we have at least one input files.
/// The input file can be a file, the standard input, or a glob (evn a glob returns empty results).
/// The input file can be a file, the standard input, or a glob (even a glob returns empty results).
pub fn has_input_files(arg_matches: &ArgMatches) -> bool {
get_strings(arg_matches, "input_files").is_some()
|| get_strings(arg_matches, "glob").is_some()
Expand Down
2 changes: 1 addition & 1 deletion packages/hurl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fn main() {
Err(CliError::Runtime(msg)) => exit_with_error(&msg, EXIT_ERROR_RUNTIME, &base_logger),
};

// Compute duration of the test here to not take reports writings into acccount.
// Compute duration of the test here to not take reports writings into account.
let duration = start.elapsed();

// Write HTML, JUnit, TAP reports on disk.
Expand Down
2 changes: 1 addition & 1 deletion packages/hurl_core/src/parser/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ mod tests {
suggestion(&valid_values, "assert"),
Some("Asserts".to_string())
);
assert_eq!(suggestion(&valid_values, "asser"), None);
assert_eq!(suggestion(&valid_values, "assert"), None);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion packages/hurl_core/src/parser/xml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ mod tests {
<genre>Science Fiction</genre>
<price>6.95</price>
<publish_date>2000-11-02</publish_date>
<description>After an inadvertant trip through a Heisenberg
<description>After an inadvertent trip through a Heisenberg
Uncertainty Device, James Salway discovers the problems
of being quantum.</description>
</book>
Expand Down
14 changes: 7 additions & 7 deletions packages/hurl_core/src/text/styledstring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,31 +121,31 @@ impl StyledString {
let mut width = 0;

for token in &self.tokens {
let mut chunck = String::new();
let mut chunk = String::new();
let mut it = token.content.chars().peekable();

// Iterate over each chars of the current token, splitting the current
// token if necessary
while let Some(c) = it.next() {
chunck.push(c);
chunk.push(c);
width += 1;

if width >= max_width {
let token = Token::new(&chunck, token.style);
let token = Token::new(&chunk, token.style);
string.push_token(token);
if it.peek().is_some() {
// New lines are always plain
let nl = Token::new("\n", Style::new());
string.push_token(nl);
}
chunck = String::new();
chunk = String::new();
width = 0;
}
}

// Append the last chunck
if !chunck.is_empty() {
let token = Token::new(&chunck, token.style);
// Append the last chunk
if !chunk.is_empty() {
let token = Token::new(&chunk, token.style);
string.push_token(token);
}
}
Expand Down