Share to: share facebook share twitter share wa share telegram print page

Lint (software)

Lint is the computer science term for a static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs.[1] The term originates from a Unix utility that examined C language source code.[2] A program which performs this function is also known as a "linter".

History

Lint
Original author(s)Stephen C. Johnson
Developer(s)AT&T Bell Laboratories
Initial releaseJuly 26, 1978; 46 years ago (1978-07-26)[2]
Written inC
Operating systemCross-platform
Available inEnglish
TypeStatic program analysis tools
LicenseOriginally proprietary commercial software, now free software under a BSD-like license[3][4]

Stephen C. Johnson, a computer scientist at Bell Labs, came up with the term "lint" in 1978 while debugging the yacc grammar he was writing for C and dealing with portability issues stemming from porting Unix to a 32-bit machine.[5][2] The term was borrowed from the word lint, the tiny bits of fiber and fluff shed by clothing, as the command he wrote would act like a lint trap in a clothes dryer, capturing waste fibers while leaving whole fabrics intact. In 1979, lint programming was used outside of Bell Labs for the first time, in the seventh version (V7) of Unix.

Over the years, different versions of lint have been developed for many C and C++ compilers, and while modern-day compilers have lint-like functions, lint-like tools have also advanced their capabilities. For example, Gimpel's PC-Lint, introduced in 1985 and used to analyze C++ source code, is still for sale.[5]

Overview

In his original 1978 paper Johnson stated his reasoning in creating a separate program to detect errors, distinct from that which it analyzed: "...the general notion of having two programs is a good one" [because they concentrate on different things, thereby allowing the programmer to] "concentrate at one stage of the programming process solely on the algorithms, data structures, and correctness of the program, and then later retrofit, with the aid of lint, the desirable properties of universality and portability".[2]

Successor linters

The analysis performed by lint-like tools can also be performed by an optimizing compiler, which aims to generate faster code. Even though modern compilers have evolved to include many of lint's historical functions, lint-like tools have also evolved to detect an even wider variety of suspicious constructs. These include "warnings about syntax errors, uses of undeclared variables, calls to deprecated functions, spacing and formatting conventions, misuse of scope, implicit fallthrough in switch statements, missing license headers, [and]...dangerous language features".[6]

Lint-like tools are especially useful for dynamically typed languages like JavaScript and Python. Because the interpreters of such languages typically do not enforce as many and as strict rules during execution, linter tools can also be used as simple debuggers for finding common errors (e.g. syntactic discrepancies) as well as hard-to-find errors such as heisenbugs (drawing attention to suspicious code as "possible errors").[7] Lint-like tools generally perform static analysis of source code.[8]

Lint-like tools have also been developed for other aspects of software development: enforcing grammar and style guides for given language source code.[citation needed] Some tools (such as ESLint) also allow rules to be auto-fixable: a rule definition can also come with the definition of a transform that makes the rule no longer not triggered. Rules about style are especially likely to come with an auto-fix. If the linter is run in "fix all" mode on a file that triggers only rules about formatting, the linter will act just like a formatter.

See also

References

  1. ^ "About SublimeLinter". The SublimeLinter Community, revision 1cecc79c. Retrieved 2020-03-29.
  2. ^ a b c d Johnson, Stephen C. (25 October 1978). "Lint, a C Program Checker". Comp. Sci. Tech. Rep. Bell Labs: 78–1273. CiteSeerX 10.1.1.56.1841. Archived from the original on 2022-01-23.
  3. ^ "UNIX is free!". lemis.com. 2002-01-24.
  4. ^ Broderick, Bill (January 23, 2002). "Dear Unix enthusiasts" (PDF). Caldera International. Archived from the original (PDF) on February 19, 2009.
  5. ^ a b Morris, Richard (1 October 2009). "Stephen Curtis Johnson: Geek of the Week". Red Gate Software. Retrieved 19 January 2018.
  6. ^ "Arcanist User Guide: Lint". Phabricator. Retrieved 19 January 2018.
  7. ^ "ESLint - Customizable JavaScript linting tool (1)". theCodeCampus. 2015-06-09. Retrieved 2019-04-21.
  8. ^ Jones, Nigel (1 May 2002). "How to Use Lint for Static Code Analysis". Barr Group.

Further reading

Read other articles:

تعتمد هذه المقالة اعتماداً كاملاً أو شبه كامل على مصدر وحيد. فضلاً، ساهم في تحسين هذه المقالة بإضافة مصادر إضافية لضمان وجهة النظر المحايدة. (ديسمبر 2018) الفرقةالمدرعة التاسعة شعار الفرقة التاسعة الدولة  العراق الإنشاء آب 2005 الولاء الجيش العراقي النوع مدرعة الحجم فرقة الم

العلاقات التشادية الهايتية تشاد هايتي   تشاد   هايتي تعديل مصدري - تعديل   العلاقات التشادية الهايتية هي العلاقات الثنائية التي تجمع بين تشاد وهايتي.[1][2][3][4][5] مقارنة بين البلدين هذه مقارنة عامة ومرجعية للدولتين: وجه المقارنة تشاد هايتي المس

بطولة باريس المفتوحة 1976 - الفردي البلد فرنسا  التاريخ 1976  الرياضة كرة المضرب  البطل(ة) إدي دبس الوصيف(ة) خايمي فيلول النتيجة 5–7، 6–4، 6–4، 7–6 تعديل مصدري - تعديل   في بطولة باريس المفتوحة 1976 - الفردي فاز الأمريكي إدي دبس بلقب البطولة بعد فوزه على التشيلي خايمي فيلول ف...

Disambiguazione – Se stai cercando altri significati, vedi Palazzo Sauli (disambigua). Palazzo SauliLocalizzazioneStato Italia RegioneLiguria LocalitàGenova IndirizzoVico dei Ragazzi, 6 Coordinate44°24′30.43″N 8°55′52.03″E / 44.408453°N 8.931119°E44.408453; 8.931119Coordinate: 44°24′30.43″N 8°55′52.03″E / 44.408453°N 8.931119°E44.408453; 8.931119 Informazioni generaliCondizioniIn uso CostruzioneXVI secolo; XVII-XVIII secolo Inaug...

Diócesis de Liepāja Dioecesis Liepaien(sis) (en latín) Catedral de San JoséInformación generalIglesia católicaIglesia sui iuris latinaRito romanoSufragánea de Arquidiócesis de RigaFecha de erección 8 de mayo de 1937SedeCatedral Catedral de San JoséCiudad sede LiepājaPaís Letonia LetoniaJerarquíaObispo Viktors StulpinsEstadísticasPoblación— Fieles (2019)26 950Parroquias 32Superficie 13 210 km² Mapa de la diócesisSitio web www.katedrale.lv/[editar dat...

Поет Овідій переживав за свою кохану, Корінну. Вона зробила аборт, ризикуючи власним життям: Плоду, що в лоні вже зрів, позбувшись так нерозважно, Зблідла Корінна лежить - бореться смерть із життям. Рішення те, небезпечний свій намір, ховала від мене; Гнівом по праву киплю, т...

  المركز الوطني لمعلومات التقانة الحيوية المركز الوطني لمعلومات التقانة الحيوية‌   الاختصار (بالإنجليزية: NCBI)‏  البلد الولايات المتحدة  المقر الرئيسي بيثيسدا  تاريخ التأسيس 4 نوفمبر 1988  المنظمة الأم المكتبة الوطنية لعلم الطب  الموقع الرسمي الموقع الرسمي...

Sporting event delegationKuwait at the1984 Summer OlympicsIOC codeKUWNOCKuwait Olympic CommitteeWebsitewww.kuwaitolympic.net (in Arabic and English)in Los AngelesCompetitors23 in 5 sportsMedals Gold 0 Silver 0 Bronze 0 Total 0 Summer Olympics appearances (overview)196819721976198019841988199219962000200420082012201620202024Other related appearances Independent Olympic Athletes (2016) Kuwait competed at the 1984 Summer Olympics in Los Angeles, United States. 23 competitors, all men, ...

East German artistic gymnast Magdalena SchmidtMagdalena Schmidt (in the foreground, third from left) in 1968Personal informationBorn (1949-06-30) 30 June 1949 (age 74)Lauchhammer, Soviet occupation zone of GermanyHeight1.60 m (5 ft 3 in)Weight50 kg (110 lb)SportSportArtistic gymnasticsClubSC Dynamo Berlin Medal record Representing  East Germany Olympic Games 1968 Mexico City Team Magdalena Schmidt (later Magdalena Jakob, born 30 June 1949) is a retired Germa...

Human settlement in EnglandRedwickRedwickLocation within GloucestershireOS grid referenceST550858Civil parishPilning and Severn BeachUnitary authoritySouth GloucestershireCeremonial countyGloucestershireRegionSouth WestCountryEnglandSovereign stateUnited KingdomPost townBristolPostcode districtBS35Dialling code01454PoliceAvon and SomersetFireAvonAmbulanceSouth Western List of places UK England Gloucestershire 51°34′00″N 2°39′00″W / ...

American actor and film director For other people named James Kirkwood, see James Kirkwood (disambiguation). James Kirkwood Sr.Born(1876-02-22)February 22, 1876Grand Rapids, Michigan, U.S.DiedAugust 24, 1963(1963-08-24) (aged 87)Woodland Hills, California, U.S.Occupation(s)Actor, film directorYears active1909–1956Spouses Gertrude Robinson ​ ​(m. 1916; div. 1923)​ Lila Lee ​ ​(m. 1923; div. 1931&#...

This article is about the district. For its eponymous headquarters, see Sultanpur, Uttar Pradesh. District of Uttar Pradesh in IndiaSultanpur districtDistrict of Uttar PradeshHouse in SultanpurLocation of Sultanpur district in Uttar PradeshCoordinates (Sultanpur, Uttar Pradesh): 26°15′N 82°00′E / 26.250°N 82.000°E / 26.250; 82.000CountryIndiaStateUttar PradeshDivisionAyodhyaHeadquartersSultanpurTehsilsLambhua, Kadipur, Sultanpur, Jaisinghpur, BaldiraiGovern...

Malaysian politician In this Malay name, there is no family name. The name Lampong is a patronymic, and the person should be referred to by the given name, Mohammad Yahya. The Arabic-derived word bin or binti/binte, if used, means 'son of' or 'daughter of', respectively. Yang Berbahagia DatukMohammad Yahya LampongPGDKمحمد يحي لمڤوڠ‎Member of the Malaysian Parliamentfor Kota BeludIn office1982–1986Preceded byMohamad Said KeruakSucceeded byPaul Maidom PansaiMember of the Sab...

この記事には複数の問題があります。改善やノートページでの議論にご協力ください。 出典がまったく示されていないか不十分です。内容に関する文献や情報源が必要です。(2022年10月) 独立記事作成の目安を満たしていないおそれがあります。(2022年10月)出典検索?: 板橋インターチェンジ – ニュース · 書籍 · スカラー · CiNii · J-STAGE...

2012 video by Gary BarlowGary Barlow: On Her Majesty's ServiceVideo by Gary BarlowReleased3 June 2012 - Broadcast25 June 2012 - DVDGenrePop, documentaryLength60:00LabelDecca Studios, Polydor Records[1]DirectorBen WinstonProducerBen Winston Gary Barlow: On Her Majesty's Service is a documentary featuring the process of Gary Barlow writing the Queen's Diamond Jubilee official single and travelling across The Commonwealth enlisting the help of singers and musicians to feature in ...

هذه المقالة بحاجة لصندوق معلومات. فضلًا ساعد في تحسين هذه المقالة بإضافة صندوق معلومات مخصص إليها. يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة من خلال إضافة مصادر موثوق بها. أي معلومات غير موثقة يمكن التشكيك بها وإزالتها. (مارس 2016) سورة الق...

Software development library to render text onto bitmaps, and other font-related operations FreeTypeDeveloper(s)David Turner, Robert Wilhelm, Werner Lemberg[1][2] and FreeType contributorsInitial release1996; 27 years ago (1996)[3]Stable release2.13.2[4]  / 25 August 2023; 3 months ago (25 August 2023) Repositorygitlab.freedesktop.org/freetype/freetype Written inCOperating systemCross-platformTypeSoftware development library:...

Ajun Komisaris Besar Polisi (AKBP) Pangkat Polisi Dan Tentara Indonesia Sekarang (Dulu) Perwira Jenderal Polisi Jenderal Polisi Komisaris Jenderal Polisi Letnan Jenderal Polisi Inspektur Jenderal Polisi Mayor Jenderal Polisi Brigadir Jenderal Polisi Brigadir Jenderal Polisi Komisaris Besar Polisi Kolonel Ajun Komisaris Besar Polisi Letnan Kolonel Komisaris Polisi Mayor Ajun Komisaris Polisi Kapten Inspektur Polisi Satu Letnan Satu Inspektur Polisi Dua Letnan Dua Bintara dan Tamtama Ajun Inspe...

You can help expand this article with text translated from the corresponding article in French. (July 2014) Click [show] for important translation instructions. View a machine-translated version of the French article. Machine translation, like DeepL or Google Translate, is a useful starting point for translations, but translators must revise errors as necessary and confirm that the translation is accurate, rather than simply copy-pasting machine-translated text into the English Wikipedia...

River in Tianjin, China This article is about the river in China. For the canal in Iraq, see Shatt al-Hayy. Hai RiverHai HeHai River in TianjinHai River basinNative name海河 (Chinese)LocationCountryChinaStateTianjin, Hebei, Beijing, Henan, Inner Mongolia, Shanxi, ShandongPhysical characteristicsSourceTaihang Mountains、Yan Mountains MouthBohai SeaLength1,329 km (826 mi)Basin size318,200 km2 (122,900 sq mi)Discharge  • average717 ...

Kembali kehalaman sebelumnya