mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Merge pull request #7752 from peternewman/patch-6
Fix a lot of typos and initial codespell action run
This commit is contained in:
17
.github/workflows/codespell.yml
vendored
Normal file
17
.github/workflows/codespell.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# GitHub Action to automate the identification of common misspellings in text files.
|
||||
# https://github.com/codespell-project/actions-codespell
|
||||
# https://github.com/codespell-project/codespell
|
||||
name: codespell
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
codespell:
|
||||
name: Check for spelling errors
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
check_filenames: true
|
||||
skip: ./.git,./data/territory_languages.json,./data/imagery.json,./data/languages.json,./data/locales.json,./data/address_formats.json,./dist/locales,./docs/img,./dist/img,./data/presets/categories.json,./data/presets/fields.json,./data/presets/presets.json,./data/presets.yaml,./data/taginfo.json,./data/deprecated.json
|
||||
ignore_words_list: "auxilary,casette,cemetary,chancel,childs,files',froms,generat,guerilla,kindergarden,nd,specialties,vias,visibles,tos"
|
||||
only_warn: 1
|
||||
@@ -30,6 +30,7 @@
|
||||
"point"
|
||||
],
|
||||
"terms": [
|
||||
"kindergarten",
|
||||
"kindergarden",
|
||||
"pre-school"
|
||||
],
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
},
|
||||
"terms": [
|
||||
"agriculture",
|
||||
"auxiliary",
|
||||
"auxilary",
|
||||
"chicken coop",
|
||||
"farm auxiliary",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"area"
|
||||
],
|
||||
"terms": [
|
||||
"kindergarten",
|
||||
"kindergarden",
|
||||
"pre-school"
|
||||
],
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"terms": [
|
||||
"DVD",
|
||||
"VHS",
|
||||
"video cassette",
|
||||
"video casette"
|
||||
],
|
||||
"tags": {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
},
|
||||
"terms": [
|
||||
"Street Artwork",
|
||||
"Guerrilla Artwork",
|
||||
"Guerilla Artwork",
|
||||
"Graffiti Artwork"
|
||||
],
|
||||
|
||||
@@ -170,11 +170,11 @@ export function validationAlmostJunction(context) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let occurences = 0;
|
||||
let occurrences = 0;
|
||||
for (const index in way.nodes) {
|
||||
if (way.nodes[index] === node.id) {
|
||||
occurences += 1;
|
||||
if (occurences > 1) {
|
||||
occurrences += 1;
|
||||
if (occurrences > 1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,11 +46,11 @@ export function validationImpossibleOneway() {
|
||||
}
|
||||
|
||||
function nodeOccursMoreThanOnce(way, nodeID) {
|
||||
var occurences = 0;
|
||||
var occurrences = 0;
|
||||
for (var index in way.nodes) {
|
||||
if (way.nodes[index] === nodeID) {
|
||||
occurences += 1;
|
||||
if (occurences > 1) return true;
|
||||
occurrences += 1;
|
||||
if (occurrences > 1) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -104,7 +104,7 @@ describe('iD.geo - geography', function() {
|
||||
var b = [0, 0];
|
||||
expect(iD.geoSphericalDistance(a, b)).to.eql(0);
|
||||
});
|
||||
it('a straight 1 degree line at the equator is aproximately 111 km', function() {
|
||||
it('a straight 1 degree line at the equator is approximately 111 km', function() {
|
||||
var a = [0, 0];
|
||||
var b = [1, 0];
|
||||
expect(iD.geoSphericalDistance(a, b)).to.be.closeTo(110946, 10);
|
||||
|
||||
@@ -419,7 +419,7 @@ describe('iD.Lanes', function() {
|
||||
expect(bothways.length).to.eql(0);
|
||||
|
||||
});
|
||||
it('should have corrent number of direction elements', function() {
|
||||
it('should have correct number of direction elements', function() {
|
||||
var lanes = iD.osmWay({tags: { highway: 'residential', lanes: 5, 'lanes:backward': 1, 'lanes:both_ways': 1 }}).lanes().lanes;
|
||||
var forward = lanes.filter(function(l) {
|
||||
return l.direction === 'forward';
|
||||
@@ -1018,7 +1018,7 @@ describe('iD.Lanes', function() {
|
||||
highway: 'residential',
|
||||
lanes: 5,
|
||||
maxspeed: '30kmh',
|
||||
'maxspeed:lanes': '30|40|fourty|40|40'
|
||||
'maxspeed:lanes': '30|40|forty|40|40'
|
||||
}
|
||||
}).lanes().metadata.maxspeedLanes;
|
||||
expect(maxspeedLanes.unspecified).to.deep.equal([
|
||||
@@ -1029,7 +1029,7 @@ describe('iD.Lanes', function() {
|
||||
highway: 'residential',
|
||||
lanes: 5,
|
||||
maxspeed: '30kmh',
|
||||
'maxspeed:lanes': '30|40|fourty|40|random'
|
||||
'maxspeed:lanes': '30|40|forty|40|random'
|
||||
}
|
||||
}).lanes().metadata.maxspeedLanes;
|
||||
|
||||
@@ -1057,7 +1057,7 @@ describe('iD.Lanes', function() {
|
||||
highway: 'residential',
|
||||
lanes: 5,
|
||||
maxspeed: '30kmh',
|
||||
'maxspeed:lanes': '30|40|fourty|40|40'
|
||||
'maxspeed:lanes': '30|40|forty|40|40'
|
||||
}
|
||||
}).lanes().lanes;
|
||||
var maxspeedLanes = lanes.unspecified.map(function (l) {
|
||||
|
||||
@@ -261,7 +261,7 @@ describe('iD.serviceTaginfo', function() {
|
||||
server.respondWith('GET', /\/key\/values/,
|
||||
[200, { 'Content-Type': 'application/json' },
|
||||
'{"data":[{"value":"parking","description":"A place for parking cars", "fraction":0.2},'
|
||||
+ '{"value":"PArking","description":"A common mispelling", "fraction":0.2},'
|
||||
+ '{"value":"PArking","description":"A common misspelling", "fraction":0.2},'
|
||||
+ '{"value":"parking;partying","description":"A place for parking cars *and* partying", "fraction":0.2},'
|
||||
+ '{"value":"parking, partying","description":"A place for parking cars *and* partying", "fraction":0.2},'
|
||||
+ '{"value":"*","description":"", "fraction":0.2}]}']
|
||||
|
||||
Reference in New Issue
Block a user