Preventing headaches with linters and automated checks

Video in TIB AV-Portal: Preventing headaches with linters and automated checks

Formal Metadata

Preventing headaches with linters and automated checks
Title of Series
Part Number
Number of Parts
CC Attribution - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date

Content Metadata

Subject Area
While it’s very common to enforce PEP8 code style with tools like flake8, it’s rare for Django projects to use any other types of tools for automated checks. However, linters and automated checks are a good way to enforce code quality beyond code style. Human-based code reviews are great, but if an experienced programmer leaves the organization, all quality-related knowledge they have will be gone. One way to prevent this is to make developers consolidate their knowledge as custom check tools. Instead of repeating to every junior programmer how they should code, experienced developers should write tools to do that for them. Having this kind of “executable knowledge” is great to ensure long-lasting good practices in organizations. Thankfully, Python already has a number of extensible linters and check tools that can be used to consolidate knowledge. Also, Django has the System check framework, which can be used to write custom static validations to Django projects. In this talk, we’ll discuss existing linters and tools, what benefit they bring to Django projects, how to extend them and how to build custom ones. Combined with IDEs, pre-commit hooks, and CI tools, linters can validate code at programming time, commit time, or CI time, thereby ensuring good practices in all development workflow.
Computer animation Multiplication sign Metropolitan area network
Slide rule Service (economics) Slide rule Computer animation Web-Designer Software developer
Computer animation Link (knot theory) Transport Layer Security Projective plane 1 (number) Implementation Dean number
Wiki Computer animation Fuzzy logic Mereology
System call Ferry Corsten View (database) Execution unit Source code File format Set (mathematics) Mereology Formal language Uniform resource locator Single-precision floating-point format Software framework Endliche Modelltheorie Website Error message Information security Library (computing) Rhombus Theory of relativity File format Namespace Structural load Software developer Moment (mathematics) Sound effect Parameter (computer programming) Formal language Software framework Self-organization Endliche Modelltheorie Software testing Modul <Datentyp> Information security Automation Hacker (term) Physical system Trail Digital filter Functional (mathematics) Link (knot theory) Software developer Consistency Expert system Rule of inference 2 (number) Goodness of fit String (computer science) Software Authorization Uniqueness quantification Spacetime Module (mathematics) Execution unit Gender Projective plane Expert system Code Stack (abstract data type) Inclusion map Wiki Error message Computer animation Software Query language Function (mathematics) String (computer science) Library (computing)
Computer animation Bit rate Angle State of matter Software developer Field (computer science) Limit (category theory) Mereology Physical system Physical system Default (computer science)
Run time (program lifecycle phase) View (database) Demo (music) Code Field (computer science) Database Mathematical analysis Human migration Human migration Computer animation Order (biology) Software framework Endliche Modelltheorie Software framework Aerodynamics Endliche Modelltheorie Physical system Singuläres Integral
Meta element Functional (mathematics) Demo (music) Programmable read-only memory Instance (computer science) Content (media) Field (computer science) Medical imaging Type theory Information Endliche Modelltheorie Message passing Error message Window Default (computer science) Execution unit View (database) Field (computer science) Core dump Error message Endliche Modelltheorie Iteration Right angle Information security Physical system
Meta element Online help View (database) Demo (music) Simultaneous localization and mapping Shared memory Menu (computing) Instance (computer science) Statistics Error message Computer animation Physical system Default (computer science)
Density functional theory Dynamical system Code Parameter (computer programming) Mereology Software bug Formal language Fluid statics Type theory Single-precision floating-point format Software framework Endliche Modelltheorie Area Parsing Type theory Fluid statics Inference Endliche Modelltheorie Right angle Ideal (ethics) Data structure Dataflow Functional (mathematics) Computer file Cone penetration test Token ring Virtual machine Password Abstract syntax tree Branch (computer science) Mathematical analysis Theory Network topology Operator (mathematics) Ideal (ethics) Representation (politics) Condition number Window Dialect Matching (graph theory) Mathematical analysis Code Field (computer science) Core dump Letterpress printing Similarity (geometry) Word Spring (hydrology) Computer animation Network topology Abstraction Library (computing)
Functional (mathematics) Code Abstract syntax tree Mereology Power (physics) Logic Statement (computer science) Vertex (graph theory) Error message Projective plane Expression Code Mereology Letterpress printing Grass (card game) System call Open set Error message Computer animation Logic Function (mathematics) Sheaf (mathematics) Hill differential equation Endliche Modelltheorie Ideal (ethics) Musical ensemble Data structure Near-ring Abstraction
Digital filter Functional (mathematics) Hecke operator Code Direction (geometry) Network topology Query language Square number Endliche Modelltheorie Error message Social class Window Parsing Inheritance (object-oriented programming) View (database) Expression Electronic mailing list Attribute grammar Coma Berenices Letterpress printing System call Word Computer animation Endliche Modelltheorie Physical system Form (programming) Reading (process)
Parsing Digital filter Slide rule Demo (music) Coma Berenices Emulation Word Computer animation Network topology Inference Endliche Modelltheorie Hydraulic jump Formal grammar
Image resolution Image resolution Demo (music) Code Abstract syntax tree Variable (mathematics) Variable (mathematics) Type theory Computer animation Interpreter (computing) Operator (mathematics) Single-precision floating-point format Inference Social class Information Vertex (graph theory) p-adische Zahl Library (computing)
Satellite Digital filter Entropiecodierung Multiplication sign View (database) Set (mathematics) Instance (computer science) Computer font Mereology Power (physics) Operator (mathematics) Query language Square number Endliche Modelltheorie Window Expression Attribute grammar Letterpress printing Residual (numerical analysis) Database normalization Computer animation Query language Inference Endliche Modelltheorie Thumbnail Right angle Figurate number Pressure Reverse engineering Singuläres Integral
Demo (music) Maxima and minima Mathematical analysis Inference Latent heat Type theory Computer animation Inference Energy level Video game Right angle Vertex (graph theory) Implementation p-adische Zahl
Point (geometry) Java applet Continuous integration Multiplication sign Typinferenz Java applet Sampling (statistics) Code Type theory Inference Computer animation Googol Computer programming Inference Computer programming Right angle Library (computing) Oracle
INTEGRAL Real number Multiplication sign Electronic Government Menu (computing) Mereology Disk read-and-write head Revision control Type theory Computer animation Bit rate Inference Computer programming Information security
Order (biology) Computer animation Multiplication sign Cellular automaton Boilerplate (text) Software Visual system Code Whiteboard Information security Traffic reporting Renewal theory
Dynamical system Boolean algebra Link (knot theory) Software developer Code View (database) Multiplication sign File format Instance (computer science) Mathematical analysis Mereology Formal language Data model Goodness of fit Hypermedia Single-precision floating-point format String (computer science) Query language Endliche Modelltheorie Information security Traffic reporting Form (programming) Slide rule File format Software developer Mathematical analysis Electronic mailing list Code Parallel port Field (computer science) Parameter (computer programming) Variable (mathematics) Human migration Computer animation Personal digital assistant String (computer science) Right angle Quicksort Information security Hacker (term) Clef Communications protocol Task (computing)
Workstation <Musikinstrument> Coma Berenices Bit
at the end of the and
over and
over and over again thank you all for attending to know like like you said when it's you and I'm Woodstock alot leaders so is it is vital so and it it good the which is the time for the in the the the the right our if any else you can hear me well just let me know just man OK so this
idea here I'm really happy to be with you want to the and findings press really great really congratulate the organisers on either the sponsors everyone with volunteering we really nice but if you want to set the slides there here so I would get to be there
that from Brazil on a CD called this perceive it is you know a warning in an excited to start the the because it couldn't find a great place to work with Django and item on my CDN was started being there with other partners and we work with companies worldwide and doing or development services goes the web development with jingling react and where the
probably there's what their daily and why using them how people then went to run them and which ones exist and we can use general projects 1st of all what what the beast being by I don't
see an native speakers so that I new work link this that little thing uh that little being that
I really like that that winning both the love that accumulates In the last part and we hate I but you can check that all Wiktionary and their real that the human also good suggestion here clinging Fuzzy-FLoW I think it's a really good name for a new then sociology for R&D than that on idea here and Eileen terror and
slots not many people call the selling there but some do exactly that remove that that you know that that we may and this is
also valid for supper uh there's internal software that underlie school by fall in error helping to remove that meaningful but that we're 8 8 and here is a very basic simple using by flakes think them all well known I being the of so that again that that's that your my some function uses use that litigating diamond the you can find that in in this quite a good governor of Colombo that we may be when they do during OK but why you may not be go music OK but I don't need this kind of mistakes like at expert developer I don't need that OK what's wrong with this goal anybody but I are then 1 what's wrong it 10 seconds so In 1 find their let during yet using return like you are overriding query sets up remember that you the exploration of all those things with you rods that so you need but when it again to the viral you are working with for any read so this is the work that many gender developers are already and then only in the re read about this kind of thing nothing yes again and will see all and in that prevent that style at the 1st thing that we've ever made for but they're in prevent that authors of birds and even security where we use them or that if I have n o on other thing that many people consider but I think is really important is that expert developers no language framework like related where's single mistake and maybe those expert developers should write that knowledge of how as link the checks and his way that the knowledge is perpetuated into shacks and it will then can do a lot of benefit there the community so far then is a using their skin consolidate knowledge that the 0 4 previously been enforced lesson with practices you cannot only quote by checks it can even help to train you developers In fact organizations already doing this uh I don't know much about schools that source of organizations but all this authority mentally that means that had fallen checker with a finding inflated loadings OpenStack to edX do salts that to all of them implement with Michael silently it by the bandit looking because those leaders are expressible in you can write your own check for them and that kind of things that organization last setting I like if you're using some blacklisted modules or model that should be best only into shouldn't view the real a school that for for the project on the project because it and string formatting of bodily a string from writing by those and respect the single with a single deals with something right now there are many ways this reform bible so you can write a check to prevent that so you can like make people aware that they're forgetting to call on unit that set up you know and anyway there are many many things you can check In part riding the also another thing that lingers who that they make better you wear but for libraries and frameworks because error prevention is who you are in effect general does that many people that know that you know the thing with some tracks this season checked framework with some butene checks that you can run read by terminated BY here if you have a lot of work and whether it will
rotate that's duplicating the namespace of 4 for the URL into 2 different that's at 1 at 1 but it should be at 1 of you and if you run objected to the fact that when you to show a warning indirect rule a return that moment without non 0 exit that cold and then you can run this even as a part of the of the i here the Shek for this kind of stuff that but there are many
checks the general doesn't limit yet but it's good for example if you if you are feud is straightforward jingle docs uh you should make sure that you are pressing the gullible because incorrectly using the full with our empty least rate some would call the full that is shared between all these systems operate you then you probably don't want that and the
suggestion for the angle and we can work on Apple's brings up I'm relieved there have been 2 joint someone to work on this is that perhaps every insurance remember to not forget or similar warnings that are own the docks Jamaica land uses the fact that is way that developers will be able to share their own gold and prevent but sorry state the other part of the reason that the middle well or on the news something OK but how how can we write those checks but we can either do via dynamic analysis or static then again and
performed by executing called like that's a fairly at runtime you can just run because the shaken but you have to run it world In order to work 7 checks need need to be dynamic for example they need to execute him with any to introspect models on the I checked for applied migration is an example you can't do that that's steadily you need to connect the database bijective the migration even apply and genesis and infect framework the that we can solve this problem that I just those views of setting up Italy's the full glory feel weird other than a check let's see how so I've been 0 because like the most never go wrong uh so I
have here a bimodal OK
where it's mentally says that a full and it's honorary field so wrong because auto uh like all posts we shared the same before the same bags it's not new in again right uh but the checks up the lifestyle something that we import the right the jacks were you're right so the function that had function and he this checkpoint Joan we he overall models from all let's and iterate over all fields for these models and if that Finland Summary field if they can have that will and is therefore less local it is only a or images append their In this error so is in their cities if you the use of a policeman's that's shared between of user said and then add user at their release return user if we're going like I had to of course had
to at these checks that here was OK so just added the that here and if noting that PY
share it saves so that he found that that that fools but that's users the following stuff that shared between all view is that the you should use that problems that and if we fix near and run it again it
there there is none so we wrote check that
really works in is really doing the right thing preventing bugs that's great
stuff but there is also a static analysis and that's far without actually executing goal and because of that is safer and more general than dynamic analysis In analyze alkyl group so when know when dynamic analysis side i.e. you boast obviously into 1 of the conditions because it's actually executing the with that again as you are looking for the cone not executing it so you can analyze that all branches of the flow a single article review but performed by machines there are many types of static and Allen's me for that is something that I by like Monica then at the by the like that but the not that and rejects reason thank another theories spoken by the fact that others AST dataset and incorrectly that's In we the idea for a simple check you're just like looking for something on your code like just a single things check or simple rejects match match Jack and there is our library that there's something like that is called it it looks far I think that I can go a certain part being like best words of that someone for that there there is also the token they that approach which uses that voting but that the language has to analyze it people the view that simple you have this final note there is a base OK between the brain brings function and the open parenthesis and if you tokenized and these new file you see that the tokens are named frame in upper operator a friend this and areas of business of 1 between them they can you can write style with spoke in uh token cytokine analysis in fact Bikel style uses these but it's better to get stricter than Raul that's obviously but it does not losing full so if you look at myself but in either cold and underpin I did you get this thing called back it's idea 1st I'll check and by quotes part of lately you that you and more more more it's interesting days the abstract thing that really the checks the use example of abstract think that spring you can run that but if you want if you just saw the as the library to really bring the DFT but you can just press they have been this these part of item beauty models and you can dump it without the and you see something like that that's a tree representation of the people that the code the module and as a function definition sided with arguments in the body that has return that's over regions fleeing left and right of greater than its and that of but it's up to the representation of the people and it abstracts only for always for example if as anything else legal method you out so that's why it's called abstractly but it abstracts only fall away from the cold it's ideal
projects and the 1 I like this stricter off the code as a hold by a 2nd the relationship between parts for example logic errors undefined and they inflate that you this is the basic checks like again seen this at the for you and this
these made for walkin OK uh you you get you again you can well today as the using unknown use the abstraction and here is just a simple example or uh some code that brings out a function inside the the set up AST so it's it's the it's a recursive OK because after visiting the function definition you give using that other stuff so it you have to go generic music began but this is a local brings out the other function it can find on the political then we can solve that problem was solved that before got to return on the grass set with AST wall which isn't the you know then we must we most check for a call think that the reaction near checking for a call to the and we must share where expression no because expression will be like a bunch of power over expression something that it's not redundant or starting of our with something like that that like a political that's does not return on is not a cited in exactly that what we're looking for a before a call do filter that's an expression In general for that we have
here that goal who shack define this but will get find that we are meeting their return here we need to define up is there that in is visible visits expressions that's what we're looking for and in that direction is that a column cited he needs there so the the called function was being and proved upper class because itself but you there his madness Rivera across that obviously we need to teach that to the cold so we just great you're a list of words that returning methods you directs Slidell refused logic and that gives an example here and these metals needs to be called learning and his name must be self government member people felt that future but it is this is partly a check that is an actor but future and spot below so then if we if all of that is true we just bawled out so that future a in at an expression it's missing the return growing and then we can just bring Gross said expressions on assignment than error uh 1 thing that's missing here is that I'm visiting expression on all the code been call on our collective I need to make sure that I will leave it is it but if it's inside our class that inherits from process and but it is very didn't that growth that was that the story that checks if the base even after world and if they do that with a square so if I do that I'm checking that I'm inside a class that's you're reading from model but that any but if I
run this goal but the of parents but I find that it it finds that this out you there FIL and if I fix it will
return there again there was a way but for and that's great and made a new
shack newly inter here but
it's not where if we if we do something like this we get it back but infecting itself but if you there we are not protecting something that we've done that were set In operating over words that again with the words that we are not taking the of obviously is quite difficult to share this so how how can we fix this it would be great if you will be fired it but also about the skull In we can we use the 1st laser checks
up we can infer from from a singles we can things like import variables that move resolutions operation resumes madam resolution as etc. we can do something like and separate that that doesn't actually executes a cold but I'm delighted it airing some equal and by those that with that this library called off operates in we can show that
where here the same goal of being of the same but we solve that if we had set up all the skull here the other thing there could detect it with the but using us write that believe that power by the weekend isn't that pressure again OK and if the expression has coincided and if we infer the residue about the skull and there other top the skull is a query set we hope we are I don't know red font something that repels squares set in the is an expression and is probably wrong because you don't do operations on choir it do nothing up there is you usually return all of a scientist's on the so just by doing that but by inferring we found the book and if we run this gone here you see that it takes a lot of time to 1st of all but he finds it but in I bring year what what was incurred and it was inferred that there is so the reason about the operation should be up by some query sets
and that's great but the I'm doing something here I'm not sure the shown right now I'm teaching us right Leifer our credits that because we present codes quite complex after a again undelighted and figure out that you the reverse the query that of the plant that uses the model and the thing I need to be that the top right but it's not that very difficult at having to do the same thing to say that prices redundant method returns % again goes and say that hey you have acquired set pieces of paper In deviates up if disease-disease up the that price is really a query set for these kind of metal you very return at all you will you be further another question he felt that the operations of require a satellite view the ribbon another parts when the beach that last but it it doesn't make much this fiscal year in knows fair where at that's
amazing uh but some of you might
think what about my life my bike in the tight 1st level of argue is not there
yet i s that on my wife of my by human you a really happy with this the but it is said that it would be very useful in on might buy for inference but you can also be very complicated and is not something they're working on right now but I wasn't by the last week and there were people from my pride and they really excited about the of there were the like sometimes but right now but we can be so big you know and just
write to defer the end a sample for that but it's not very useful you can check their uh there are some this was me that you can check what I'm doing but it's not going there all of libraries that all the type inference by type I shot will make use of my publications library and had inference capabilities right use up by politicians yet but it will we use and but by that quarterly that has only initial point but the 3 support even though it's even more than 500 will rooted and by Chinese implemented in Java so that an OK
when went to run this week and running does on preventing time commit time put use the written by oracle review programming time was a
few months that that at the at the working there but there's other some stuff that you
never become a that is from a real government website for review because here someone committed that only and to prevent committee has kind of stuff you sure run check from the
mean time OK you have recommend part at that rate to written type they could not use it try to use it it checks for this kind of things do like conflict there the security related the even anything you want to think what you're but in his integration
time of many people don't that but you should when you you if you're defending their reports any his is really bargain especially for things related to security value that related the like bandit and since the initial failure you if any of the and
also good review by you can have a board that comments on no all requests especially useful for all the cells predicts those uprooted from believed that the that which means that they're out there may be
many those of sampling there's I will be the sort quality imports stops security packagings even spelling someone a link there to shut this not of this brings up there but but they qualities it that the variables and you can drop them all with respect the upright only through but if you never would be language predict can use got all other value you that it recruited that roughly the from bilingual In
let's clean all the things I created a list of all the leaders like part time it's there because of the by than good analysis there are many many leaders that you can use and I have some ideas for new general text right like checking for string formatting in Rowlett surprise that's means x as we only get we don't want that are known to reach our view that that's spilled I think we can work on that also raise so we you I'm living in the studying writing subjects let me know look for me sprints I want to make a new protocol general trying to have checked for that but in finally some people criticize coordinated because if it is possible to use or it doesn't understand dynamics that but maybe if good and then there's any or all media tools like to complex in your fellow developers want understand it so let's right single DB checkable cold are parallel development and venture check and that the uh let here's my contacting feel free to restrain let's write would only a general kind of thing that just about by you would think that and you can check that by doing this isn't good analysis report . or actually thought falling delayed from there are other talks were being that available on the these obviously you give another talk today about salary that P 1 of my partners that I think that we know that the review thank you very much but can science and then try on the time and I said he and his sleeve on and then right Our many innocent and then and sell a lot wasn't that inspired you to become so passionate about helping you know people come on board would you leave make easier its use to such a case the the PLO on on the that we do a lot of code review of all this good reviews for myself repeating but myself too much like the same mistakes again and again because we knew people were joining the company and so I thought maybe I should write something to show for it's of the right that was evil the rural 1 of the 1st checks lesser check if someone forgot to run make migration so it's like it and it would to shackle will request like you need a little that someone changed the models but even didn't include the migration or the progress of but it would but something that we are a big enough that they you forgot running migration so we wrote the check for it and we are trying with a new beginning to work on being that the right consolidated knowledge we had proposed reviews that years of experience in the form of the and tho the returns that perhaps
stations Jt bit