From 870b3657b667690e2b284db92cb017263c220152 Mon Sep 17 00:00:00 2001 From: Patrick R Date: Wed, 5 May 2021 11:26:10 +0200 Subject: [PATCH 1/6] This changes the usage of allLiterals to literals, which returns the assumed set of objects in > Squeak 5.1 --- .../SLClassMetricsPlugIn.class/instance/allMethodsUsedIn..st | 2 +- .../instance/baseClassUsageRatio..st | 1 - .../SLClassMetricsPlugIn.class/methodProperties.json | 4 ++-- .../SLMiscPlugIn.class/instance/indirectlyAccessedVars.in..st | 2 +- .../SLMiscPlugIn.class/methodProperties.json | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/instance/allMethodsUsedIn..st b/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/instance/allMethodsUsedIn..st index 90d895ce..5224c5f3 100644 --- a/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/instance/allMethodsUsedIn..st +++ b/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/instance/allMethodsUsedIn..st @@ -5,5 +5,5 @@ allMethodsUsedIn: aSLClassTestObject ^ aSLClassTestObject methods inject: Set new into: [ :set :method | - set addAll: method testObject allLiterals; + set addAll: method testObject literals; yourself] \ No newline at end of file diff --git a/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/instance/baseClassUsageRatio..st b/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/instance/baseClassUsageRatio..st index 4e28fa36..09b0e115 100644 --- a/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/instance/baseClassUsageRatio..st +++ b/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/instance/baseClassUsageRatio..st @@ -5,7 +5,6 @@ baseClassUsageRatio: aSLClassTestObject description: 'Answer the number of instance-specific members used by the measured class, divided by the instance-specific members from the base class.' > | numberOfBaseElements | - numberOfBaseElements := self countBaseElementsOf: aSLClassTestObject. ^ self percentageResult: ((numberOfBaseElements > 0) diff --git a/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/methodProperties.json b/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/methodProperties.json index 093bd670..2b62ab2f 100644 --- a/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/methodProperties.json +++ b/packages/SwaLint-PlugIns.package/SLClassMetricsPlugIn.class/methodProperties.json @@ -34,10 +34,10 @@ "instance" : { "accessToForeignData:" : "JTM 5/27/2015 11:41", "allForeignMethodsUsedIn:" : "AT 5/7/2008 21:33", - "allMethodsUsedIn:" : "AT 5/7/2008 21:33", + "allMethodsUsedIn:" : "smalltalkCI 5/5/2021 10:52", "avgLOCperMethod:" : "NA 7/25/2015 20:54", "baseClassOverridingRatio:" : "NA 7/25/2015 20:54", - "baseClassUsageRatio:" : "NA 7/29/2015 11:21", + "baseClassUsageRatio:" : "smalltalkCI 5/5/2021 10:52", "classAMW:" : "NA 7/25/2015 21:09", "classLOC:" : "NA 7/25/2015 20:58", "classNAS:" : "NA 7/25/2015 21:00", diff --git a/packages/SwaLint-PlugIns.package/SLMiscPlugIn.class/instance/indirectlyAccessedVars.in..st b/packages/SwaLint-PlugIns.package/SLMiscPlugIn.class/instance/indirectlyAccessedVars.in..st index 6a15e52e..b2e1732b 100644 --- a/packages/SwaLint-PlugIns.package/SLMiscPlugIn.class/instance/indirectlyAccessedVars.in..st +++ b/packages/SwaLint-PlugIns.package/SLMiscPlugIn.class/instance/indirectlyAccessedVars.in..st @@ -6,7 +6,7 @@ indirectlyAccessedVars: aSLMethodTestObject in: aSLClassTestObject accessorsOfClass := aSLClassTestObject resultOf: #allAccessors:. usedVars := Set new. instVars := aSLClassTestObject testObject allInstVarNames. - literals := aSLMethodTestObject testObject allLiterals. + literals := aSLMethodTestObject testObject literals. usedVars addAll: (accessorsOfClass select: [ :a | diff --git a/packages/SwaLint-PlugIns.package/SLMiscPlugIn.class/methodProperties.json b/packages/SwaLint-PlugIns.package/SLMiscPlugIn.class/methodProperties.json index 2652b842..6889721f 100644 --- a/packages/SwaLint-PlugIns.package/SLMiscPlugIn.class/methodProperties.json +++ b/packages/SwaLint-PlugIns.package/SLMiscPlugIn.class/methodProperties.json @@ -14,7 +14,7 @@ "directlyAccessedVars:" : "NA 7/26/2015 19:07", "firstAccessed:by:" : "AT 2/2/2008 14:38", "firstAccessedBy:" : "AT 5/8/2008 09:37", - "indirectlyAccessedVars:in:" : "NA 7/27/2015 00:15", + "indirectlyAccessedVars:in:" : "smalltalkCI 5/5/2021 10:50", "isAccessor:" : "JTM 5/27/2015 11:13", "isGetter:" : "JTM 5/27/2015 11:13", "isPrivate:" : "NA 7/25/2015 20:24", From 984ef90d2bef0ff40d92aadcf445be8699e8b401 Mon Sep 17 00:00:00 2001 From: Patrick R Date: Wed, 5 May 2021 17:58:42 +0200 Subject: [PATCH 2/6] Updates version to load of Refactoring package --- .../BaselineOfSwaLint.class/instance/baseline..st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/BaselineOfSwaLint.package/BaselineOfSwaLint.class/instance/baseline..st b/packages/BaselineOfSwaLint.package/BaselineOfSwaLint.class/instance/baseline..st index 78270d0d..5203d2b5 100644 --- a/packages/BaselineOfSwaLint.package/BaselineOfSwaLint.class/instance/baseline..st +++ b/packages/BaselineOfSwaLint.package/BaselineOfSwaLint.class/instance/baseline..st @@ -8,7 +8,7 @@ baseline: spec project: 'RefactoringBrowser' with: [ spec className: 'ConfigurationOfRefactoringBrowser'; - versionString: #'stable'; + versionString: '3.0'; loads: #('Core' ); repository: 'http://www.squeaksource.com/MetacelloRepository' ]; project: 'Grease' with: [ @@ -48,4 +48,4 @@ baseline: spec spec for: #'pharo1.2.x' do: [ spec preLoadDoIt: #preLoadPharo200; - postLoadDoIt: #postLoadPharo200]. \ No newline at end of file + postLoadDoIt: #postLoadPharo200]. From 3921010cdb6ed6a84f0cc51b5e9861978fd71104 Mon Sep 17 00:00:00 2001 From: Patrick R Date: Wed, 5 May 2021 18:01:50 +0200 Subject: [PATCH 3/6] Revert "Updates version to load of Refactoring package" This reverts commit 984ef90d2bef0ff40d92aadcf445be8699e8b401. This is necessary as the master is at the present point still designated for development for 5.3. --- .../BaselineOfSwaLint.class/instance/baseline..st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/BaselineOfSwaLint.package/BaselineOfSwaLint.class/instance/baseline..st b/packages/BaselineOfSwaLint.package/BaselineOfSwaLint.class/instance/baseline..st index 5203d2b5..78270d0d 100644 --- a/packages/BaselineOfSwaLint.package/BaselineOfSwaLint.class/instance/baseline..st +++ b/packages/BaselineOfSwaLint.package/BaselineOfSwaLint.class/instance/baseline..st @@ -8,7 +8,7 @@ baseline: spec project: 'RefactoringBrowser' with: [ spec className: 'ConfigurationOfRefactoringBrowser'; - versionString: '3.0'; + versionString: #'stable'; loads: #('Core' ); repository: 'http://www.squeaksource.com/MetacelloRepository' ]; project: 'Grease' with: [ @@ -48,4 +48,4 @@ baseline: spec spec for: #'pharo1.2.x' do: [ spec preLoadDoIt: #preLoadPharo200; - postLoadDoIt: #postLoadPharo200]. + postLoadDoIt: #postLoadPharo200]. \ No newline at end of file From 3aacf0c823c402d9d70157468b5978862f3d1280 Mon Sep 17 00:00:00 2001 From: Patrick R Date: Wed, 5 May 2021 18:08:03 +0200 Subject: [PATCH 4/6] New build configurations --- .github/workflows/develop.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 15 +++++++++------ 2 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/develop.yml diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml new file mode 100644 index 00000000..2db2958b --- /dev/null +++ b/.github/workflows/develop.yml @@ -0,0 +1,34 @@ +name: allTests +on: + push: + branches-ignore: + - main + pull_requests-ignore: + branches: + - main + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +jobs: + # This workflow contains a single job called "build" + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + # Select platform(s) + os: [ ubuntu-latest ] + # Select compatible Smalltalk image(s) + smalltalk: [Squeak64-trunk, Squeak64-5.3, Squeak64-5.2] + name: ${{ matrix.smalltalk }} on ${{ matrix.os }} + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - uses: hpi-swa/setup-smalltalkCI@v1 + with: + smalltalk-image: ${{ matrix.smalltalk }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: smalltalkci -s ${{ matrix.smalltalk }} + timeout-minutes: 15 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 673fc9fc..86b553bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,11 @@ -name: tests -on: [push, pull_request] +name: mainTests +on: + push: + branches: + - main + pull_requests: + branches: + - main # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch @@ -12,10 +18,7 @@ jobs: # Select platform(s) os: [ ubuntu-latest ] # Select compatible Smalltalk image(s) - smalltalk: [Squeak64-trunk, Squeak64-5.3, Squeak64-5.2] - include: - - smalltalk: Squeak64-trunk - - continue-on-error: true + smalltalk: [Squeak64-5.3, Squeak64-5.2] name: ${{ matrix.smalltalk }} on ${{ matrix.os }} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it From 6ff00db0f5af6049fe4978d7206a9e89e0ca64e4 Mon Sep 17 00:00:00 2001 From: Patrick R Date: Wed, 5 May 2021 18:08:55 +0200 Subject: [PATCH 5/6] Changes readme to use main instead of master branch --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fe1c666d..1a80bd47 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ SwaLint [![Build Status][gh_badge]][gh_action] [![Build status][appveyor_badge]][appveyor] =================== - + A code critics tool for Smalltalk projects. After installation you can open the **SwaLint Code Critics** via *Apps*. @@ -49,6 +49,6 @@ Go to the [latest release of SwaLint](https://github.com/hpi-swa-teaching/SwaLin [appveyor]: https://ci.appveyor.com/project/hpi-swa-teaching/swalint [appveyor_badge]: https://ci.appveyor.com/api/projects/status/uj2j9trw2x6yq9iy?svg=true [gh_action]: https://github.com/hpi-swa-teaching/SwaLint/actions/workflows/main.yml -[gh_badge]: https://img.shields.io/github/workflow/status/hpi-swa-teaching/SwaLint/tests/master?logo=github +[gh_badge]: https://img.shields.io/github/workflow/status/hpi-swa-teaching/SwaLint/tests/main?logo=github [coveralls]: https://coveralls.io/github/hpi-swa-teaching/SwaLint?branch=develop [coveralls_badge]: https://coveralls.io/repos/github/hpi-swa-teaching/SwaLint/badge.svg?branch=develop From aa70b961fb1b38219e4f55c612840306e44d753a Mon Sep 17 00:00:00 2001 From: Patrick R Date: Wed, 5 May 2021 18:12:23 +0200 Subject: [PATCH 6/6] Fixes typos in build configuration --- .github/workflows/develop.yml | 4 ++-- .github/workflows/main.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 2db2958b..037972a7 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -3,8 +3,8 @@ on: push: branches-ignore: - main - pull_requests-ignore: - branches: + pull_request: + branches-ignore: - main # Controls when the action will run. Triggers the workflow on push or pull request diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86b553bd..5a21f0ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ on: push: branches: - main - pull_requests: + pull_request: branches: - main