Research Article
BibTex RIS Cite

TypeScript ile Yazılmış Kodlar için Kalite Analiz Motoru

Year 2022, Volume: 1 Issue: 1, 1 - 7, 31.05.2022

Abstract

Bu çalışmada Google tarafından Javascript yerine kullanıma sunulan yeni nesil TypeScript programlama dili ile yazılmış kod dosyaları üzerinde statik kod analizi uygulayabilen, tanımlanmış olan standartlara uygunluğun ölçülmesi ve bunun sonucunda kod dosyası için bir kalite indeks değeri hesaplayan, temel bilinen yazılım kalite parametrelerini temel alan otomatik bir yazılım kalite analiz motoru geliştirilmiştir. Kullanıcıların gerekli konfigürasyon değişikliklerini yaparak uygulama arayüzü üzerinden analiz işlemini gerçekleştirebildiği, analiz sonuçlarına, hesaplanan kalite indeks değerine ve bu değerin düşmesine yol açan durumların listesine erişebildiği bir web uygulaması olarak geliştirilen yazılım düzenlenmiştir. Çalışmada TypeScript dilini kullanan yazılım geliştiricilerinin kaliteli kod geliştirme standartlarına uygun şekilde çalışmalarına yardımcı olmak ve bu standartların ölçülebilir bir metrik yardımı ile somutlaştırılarak daha kolay şekilde takip edilmesini sağlamak amaçlanmıştır. Bu amaç doğrultusunda node.js ve Angular kütüphaneleri kullanılarak hazırlanan bir web tabanlı yazılım geliştirilmiş, bu yazılımda TypeScript dili için kurallar tanımlanmış ve kullanıcıların belirlediği konfigürasyon yardımı ile analiz edilen dosya üzerinde bu kurallar çalıştırılarak elde edilen sonuçlara göre bir kalite indeks değeri hesaplanması mümkün olmuştur. Çalışma sonucunda gerçekleştirilen kurallara ait farklı senaryolar oluşturulmuş ve bu senaryolara ait TypeScript dosyaları geliştirilen web uygulaması ile test edilerek başarım kriterleri değerlendirilmiştir. Elde edilen ilk sonuçlarda %62 düzeyinde bir başarı elde edilmiş, sistemin kullanılabilir olduğu geliştiriciler tarafından değerlendirilmiştir.

References

  • [1] Y. Fain and A. Moiseev, “Angular Development with TypeScript,” 2nd. Manning, NY, 2018.
  • [2] R. Bellairs, “What Is Code Quality? And How to Improve Code Quality.” perforce.com. https://www.perforce.com/blog/sca/whatcode-quality-and-how-improve-code-quality (accessed Apr 4 2022).
  • [3] V. Raychev, "Learning to Find Bugs and Code Quality Problems-What Worked and What not?." in 2021 International Conference on Code Quality (ICCQ). IEEE, 2021, pp.1-5.
  • [4] “ESLint About.” eslint.org. https://eslint.org/docs/about/ (accessed Apr 4 2022)
  • [5] “SonarQube Documentation.” sonarqube.org. https://docs.sonarqube.org/latest/ (accessed Apr 10. 2022)
  • [6] “First Line Outsourcing, Static Analysis of JavaScript applications with SonarQube” medium.com. https://medium.com/firstlineoutsourcing/static-analysis-of-javascript-applications-withsonarqube-1aacdf11d4ac (accessed Apr 5 2022)
  • [7] D. Stefanović, D. Nikolić, S. Havzi, T. Lolić and D. Dakić, "Static Code Analysıs Tools: A Systematic Literature Review." in Proc. of the 31st DAAAM International Symposium, B. Katalinic(ed.) Published by DAAAM International, 2020, pp. 565-573.
  • [8] E. Thoren and F. Brännlund Stål, "Usage of Angular from developer’s perspective: Based on a literature and empirical study." B.S. Dissertation, Faculty of Computing Blekinge Institute of Technology, Karlskrona, Sweden, 2017.
  • [9] S.H.Jensen, A. Møller and P. Thiemann, "Type analysis for JavaScript," in Proc. International Static Analysis Symposium, Springer, Berlin, Heidelberg, 2009, pp. 238-255.
  • [10] Aseem Rastogi, N. Swamy, C. Fournet, G. Bierman and P. Vekris, “Safe & efficient gradual typing for TypeScript,” in Proc. of the 42Nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages 2015, pp. 167-180.
  • [11] J. Bogner, and M. Merkel, ”To Type or Not to Type? A Systematic Comparison of the Software Quality of JavaScript and TypeScript Applications on GitHub,” Preprint, in Proc. Of 19th International Conference on Mining Software Repositories MSR2022, Pittshburgh PA, 2022.
  • [12] “High Charts Library Documentation,” highcharts.com. https://www.highcharts.com/docs/index (accessed Apr 10 2022).

Code Quality Analysis Engine with Codes Written in Typescript

Year 2022, Volume: 1 Issue: 1, 1 - 7, 31.05.2022

Abstract

In this study, an automatic software based on basic known software quality parameters, which can apply static code analysis on code files written with the new generation TypeScript programming language, which is made available by Google instead of Javascript, measure compliance with the defined standards and as a result calculate a quality index value for the code file. quality analysis engine has been developed. The software developed as a web application, where users can perform the analysis process through the application interface by making the necessary configuration changes, access the analysis results, the calculated quality index value and the list of situations that cause this value to decrease, has been arranged. In the study, it is aimed to help software developers using TypeScript language to work in accordance with quality code development standards and to enable these standards to be followed more easily by embodying them with the help of a measurable metric. For this purpose, a web-based software was developed using node.js and Angular libraries, rules were defined for the TypeScript language in this software, and it was possible to calculate a quality index value according to the results obtained by running these rules on the analyzed file with the help of the configuration determined by the users. As a result of the study, different scenarios of the rules were created and the TypeScript files of these scenarios were tested with the developed web application and the performance criteria were evaluated. A success of 62% was achieved in the first results obtained, and the developers evaluated that the system could be used.

References

  • [1] Y. Fain and A. Moiseev, “Angular Development with TypeScript,” 2nd. Manning, NY, 2018.
  • [2] R. Bellairs, “What Is Code Quality? And How to Improve Code Quality.” perforce.com. https://www.perforce.com/blog/sca/whatcode-quality-and-how-improve-code-quality (accessed Apr 4 2022).
  • [3] V. Raychev, "Learning to Find Bugs and Code Quality Problems-What Worked and What not?." in 2021 International Conference on Code Quality (ICCQ). IEEE, 2021, pp.1-5.
  • [4] “ESLint About.” eslint.org. https://eslint.org/docs/about/ (accessed Apr 4 2022)
  • [5] “SonarQube Documentation.” sonarqube.org. https://docs.sonarqube.org/latest/ (accessed Apr 10. 2022)
  • [6] “First Line Outsourcing, Static Analysis of JavaScript applications with SonarQube” medium.com. https://medium.com/firstlineoutsourcing/static-analysis-of-javascript-applications-withsonarqube-1aacdf11d4ac (accessed Apr 5 2022)
  • [7] D. Stefanović, D. Nikolić, S. Havzi, T. Lolić and D. Dakić, "Static Code Analysıs Tools: A Systematic Literature Review." in Proc. of the 31st DAAAM International Symposium, B. Katalinic(ed.) Published by DAAAM International, 2020, pp. 565-573.
  • [8] E. Thoren and F. Brännlund Stål, "Usage of Angular from developer’s perspective: Based on a literature and empirical study." B.S. Dissertation, Faculty of Computing Blekinge Institute of Technology, Karlskrona, Sweden, 2017.
  • [9] S.H.Jensen, A. Møller and P. Thiemann, "Type analysis for JavaScript," in Proc. International Static Analysis Symposium, Springer, Berlin, Heidelberg, 2009, pp. 238-255.
  • [10] Aseem Rastogi, N. Swamy, C. Fournet, G. Bierman and P. Vekris, “Safe & efficient gradual typing for TypeScript,” in Proc. of the 42Nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages 2015, pp. 167-180.
  • [11] J. Bogner, and M. Merkel, ”To Type or Not to Type? A Systematic Comparison of the Software Quality of JavaScript and TypeScript Applications on GitHub,” Preprint, in Proc. Of 19th International Conference on Mining Software Repositories MSR2022, Pittshburgh PA, 2022.
  • [12] “High Charts Library Documentation,” highcharts.com. https://www.highcharts.com/docs/index (accessed Apr 10 2022).
There are 12 citations in total.

Details

Primary Language English
Subjects Software Engineering
Journal Section Research Articles
Authors

Mehmet Göktürk

Fatih Koç This is me

Publication Date May 31, 2022
Published in Issue Year 2022 Volume: 1 Issue: 1

Cite

APA Göktürk, M., & Koç, F. (2022). Code Quality Analysis Engine with Codes Written in Typescript. Türk Mühendislik Araştırma Ve Eğitimi Dergisi, 1(1), 1-7.
AMA Göktürk M, Koç F. Code Quality Analysis Engine with Codes Written in Typescript. TMAED. May 2022;1(1):1-7.
Chicago Göktürk, Mehmet, and Fatih Koç. “Code Quality Analysis Engine With Codes Written in Typescript”. Türk Mühendislik Araştırma Ve Eğitimi Dergisi 1, no. 1 (May 2022): 1-7.
EndNote Göktürk M, Koç F (May 1, 2022) Code Quality Analysis Engine with Codes Written in Typescript. Türk Mühendislik Araştırma ve Eğitimi Dergisi 1 1 1–7.
IEEE M. Göktürk and F. Koç, “Code Quality Analysis Engine with Codes Written in Typescript”, TMAED, vol. 1, no. 1, pp. 1–7, 2022.
ISNAD Göktürk, Mehmet - Koç, Fatih. “Code Quality Analysis Engine With Codes Written in Typescript”. Türk Mühendislik Araştırma ve Eğitimi Dergisi 1/1 (May 2022), 1-7.
JAMA Göktürk M, Koç F. Code Quality Analysis Engine with Codes Written in Typescript. TMAED. 2022;1:1–7.
MLA Göktürk, Mehmet and Fatih Koç. “Code Quality Analysis Engine With Codes Written in Typescript”. Türk Mühendislik Araştırma Ve Eğitimi Dergisi, vol. 1, no. 1, 2022, pp. 1-7.
Vancouver Göktürk M, Koç F. Code Quality Analysis Engine with Codes Written in Typescript. TMAED. 2022;1(1):1-7.